I have many textboxes on a page need to input integer numbers. I want to two things:
1. textbox is integer number only
2. if I press "Enter" key, it automatically goes to next textbox like "TAB" key does.
for 1 I have a function:
function NumberOnly() {
var AsciiValue = event.keyCode
if ((AsciiValue >= 48 && AsciiValue <= 57) ||
(AsciiValue == 8 || AsciiValue == 127))
event.returnValue = true;
else {
alert("Please Enter Numbers Only");
event.returnValue = false;
}
}
but not sure if 1 and 2 can work together. Thanks.
I use Chrome and the function for number only does not work on FireFox
Go to the complete details ...