【js】按下enter键禁止表单自动提交 //enter键盘事件 document.onkeypress=function(){ if(event.keyCode==13){ return false; } }