Its easy:
For Validation of Phone Number that starts with only 97,98.
function phval() {
var a;
a = document.getElementById("TextBox5").value;
if (a.charCodeAt(0) == 57 && (a.charCodeAt(1) == 56 || a.charCodeAt(1) == 55)) {
alert("valid");
}
else {
alert("invalid");
}
}
For Character validation that is user cannot enter numbers in name field. code is in( JSP.)
function isNumberKey(evt)
{
var charCode = (evt.which) ? evt.which : event.keyCode
if (charCode > 31 && (charCode < 48 || charCode > 57))
return true;
return false;
}
Thank u all. ;)