<input type="text" id="numText" runat="server" />
$("#numText").keydown(function (event) {
var keycode = event.keyCode;
//comparing pressed keycodes
if (!(keycode == 8 || keycode == 46) && (keycode < 48
|| keycode > 57)) {
return false;
}
else {
return true;
}
});
$("#numText").keydown(function (event) {
var keycode = event.keyCode;
//comparing pressed keycodes
if (!(keycode == 8 || keycode == 46) && (keycode < 48
|| keycode > 57)) {
return false;
}
else {
return true;
}
});
No comments:
Post a Comment