Javascript can have simple validations and such an example is given below. Download and use the code. <html> <head> </head> <body> Input numbers between 0 and 5 Submit </body> </html> functions.js function validate() { var x, text; x = document.getElementById("numb").value; if(isNaN(x) || x < 1 || x > 5) { text = "Input not valid"; }else { text = "Input OK"; } document.getElementById("show").innerHTML = text; }
A blog where you can find all codes for Android, Corona, Basic tutorials, Interview questions and more...