-3

i need a textbox which do not able to press the alphabetic key in Java Script and remove the entered which character.

Jay Shukla
  • 13
  • 2

1 Answers1

0

simply add this attribute to your input:

onkeydown = "if(/[a-z]/i.test(String.fromCharCode((event||window.event).keyCode))){return false;}"
Mahyar
  • 681
  • 6
  • 12