摘要:
如何防止回车(enter)键提交表单,其实很简单,就一句话。onkeydown= "if(event.keyCode==13)return false;"把这句写在from标签里面就好了。下面介绍下javascript中event.keycode。keycode 8 = BackSpace BackSpace keycode 9 = Tab Tab keycode 12 = Clear keycode 13 = Enter keycode 16 = Shift_L keycode 17 = Control_L keycode 18 = Alt_L keycode 19 = 阅读全文