0
It's called form and data validation. You store user input, or form value, in a variable then run some if-statements.
11th Jun 2016, 12:57 AM
ZinC
ZinC - avatar
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.
13th Jun 2016, 1:53 AM
Ipsit Sahoo
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.
6th Dec 2016, 5:36 AM
Emanuel Miron
Emanuel Miron - avatar