Thursday, 30 June 2011

validation of number in javascript

function check_number()
{
var number=document.getElementById("mobileno").value;

if(isNaN(number))
{
alert("number only");

return false;
}
else
{
return true;
}
}