+ 1
Alerting Invalid
How to alert invalid for a negative input in JavaScript?
2 Answers
+ 3
var x = document.getElementsByTagName("input")
if (x < 0){
alert("invalid input")
}
else
alert("valid input")
//you should use this on onsubmit
event
0
Thanks.