0
It's called form and data validation. You store user input, or form value, in a variable then run some if-statements.
0
use forms and a submit button. Inside the button tag you can use onclick="new_func ()".
Create a function of same name and access the classic s and ids for input elements and tgen you can get your answer.
0
well i read all the answers and I don't agree with those. In this kind of situations i would use .addEventListener("change", function(){
/* do your condisionsl logics */
});
that means that whenever the input is changed you can handle things ... you can also use "click" if you have a form with submit button if you have just an input stick to the first option.