WannaLearn
Programmer
Can anyone tell me what's wrong with this code? It accepts the input of '5ee56' why? How can I also make sure that they entered 10 digists as well?
This is what I have so far:
var telephone = document.form.phone.value
var telephone = parseInt(telephone, 10)
if(isNaN(telephone)) {
alert("Please enter The Telephone Number"
document.form.phone.value=""
document.form.phone.focus();
return false;
}
This is what I have so far:
var telephone = document.form.phone.value
var telephone = parseInt(telephone, 10)
if(isNaN(telephone)) {
alert("Please enter The Telephone Number"
document.form.phone.value=""
document.form.phone.focus();
return false;
}