function name() { var a; a = document.form1.TextBox1.value; for (i = 0; i < a.length; i++) { if (a.indexof(charCodeAt(i) > 48) != -1 && a.indexof(charCodeAt(i) < 58) != -1) { alert("please enter valid name"); } } } function phno() { var b; b = document.form1.TextBox4.value; if (b.charAt(0) == 57 && b.charAt(1) == 56) { alert("This number is acceptable"); } else if (b.charAt(0) == 57 && b.charAt(1) == 55) alert("this number is acceptable"); }
indexof
charAt
charCodeAt
phno()
"name()"
"nameValidation()"
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)