Tuesday, July 20, 2010

Validate number in textbox using Javascript

function fnSubmit(){
var str = "ab126";
var ValidStr = "0123456789.";
var flag;
for(var i=0;i if(ValidStr.indexOf(str.charAt(i)) > 0)
flag = true;
else
flag = false;
}
}

No comments:

Post a Comment