169
rated 0 times
[
172]
[
3]
/ answers: 1 / hits: 32170
/ 14 Years ago, fri, march 4, 2011, 12:00:00
I have two text fields in my web page. The user is supposed to enter two numbers seperated by a hyphen (-) character. The numbers may be between 1 and 10 digits each. I need the cursor to move to the next field when the user presses the hyphen key.
I can easily move the cursor using $('#txtField2').focus()
. However, I still have the problem that the hyphen character remains in the first text field. How can I easily supress the hyphen from appearing in the first text field?
More From » jquery