I have the following problem to solve, when I start writing text in input, this one should turn red. Unfortunately, for unknown reasons, the variable is unidentified. Perhaps the problem is that js is not able to define the variable as input. I don't understand something here. Please help.
var input_Login = document.getElementsByTagName('input')[0];
console.log(input_Login);
function inputCheck(input_Login){
input_Login.style.color='pink';
}
var doit = input_Login.addEventListener('oninput', inputCheck);