Greetings,
I trying to validate user input to only alphabet [a-zA-Z] or '\w', but
it is not working for me.
Code:
if (document.all(" txtName").value == [a-zA-Z])
//valiation is OK..Rest of code
else{
alert("Please enter only alphabet!");
document.all("t xtName").value == "";
}
MTIA,
Grawsha
I trying to validate user input to only alphabet [a-zA-Z] or '\w', but
it is not working for me.
Code:
if (document.all(" txtName").value == [a-zA-Z])
//valiation is OK..Rest of code
else{
alert("Please enter only alphabet!");
document.all("t xtName").value == "";
}
MTIA,
Grawsha
Comment