I'm getting codes [96..105] by calling String.fromCharCode(event.keyCode)
when pressing keys [0..9](digits) on the keypad.
Though these codes correspond to characters: 'a b c d e f g h i' instead of [0..9].
Question:
I have 3 inputs in the form. User allowed to enter only in the 1-st input. While user press keys on keyboard some function need to filter it and write it to 2-nd input if pressed key is digit otherwise it must write it to the 3-rd input. How it can be corrected?
My implementation in JSFiddle
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…