📜  javascript 按键退格不起作用 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:03:57.253000             🧑  作者: Mango

代码示例1
Try "onkeydown" instead of "onkeypress".

KeyPress event is invoked only for character (printable) keys, 
KeyDown event is raised for all including nonprintable such as Control, 
Shift, Alt, BackSpace, etc.