javascript - How to use isNaN here properly? -


I have two fields, the first name is a field and the other is a number field. I want to see that the number field is numeric, if not, select () will be used and the background will change to yellow instead of blue color. I'm not able to do whatever I want in some way.

  window.onload = function () {idUser = document.getElementById ("user"); Document.getElementById ("Form"). Onsubmit = function () {if (idUser.value == "") {Warning ("username required"); IdUser.focus (); return false; } BirYear = document.getElementById ("birthday"); If (INN (BearAir)) is {Bearer select (); Warning ("number"); return false; }}}   

I am using the alert ("number"); Just to check it again to see if it is doing it properly, I do not need a warning, but in any case if I put numbers or say in both ways then this is just a cautious number which means that I do not want to be right.

People are giving me the hands

You will need to get the price:

  birYear = document.getElementById. ("Birthyear") value;   

document.getElementById ("at birth") can give you control where document.getElementById ("birthyear"). Value Give

and isNan () have no control over the value ....

Edit:

You can do this by changing the style: document.getElementById ("birthday"). Style.background-color = "yellow";

Comments

Popular posts from this blog

excel vba - How to delete Solver(SOLVER.XLAM) code -

github - Teamcity & Git - PR merge builds - anyway to get HEAD commit hash? -

ios - Replace text in UITextView run slowly -