[0-9]+(\.[0-9][0-9])?
Ex : 0.11,11,1.11
—————-javascript function for custom validator control——————
function check() {
var regx = /^([-]?)([0-9]+)((.[0-9]{2})?)$/;
var m = regx.test(document.all.txt.value);
if (m == true) {
alert(”right”);
}
else {
alert(”error”);
}
}
No comments:
Post a Comment