Let the form do not submit 1 when you press the Enter key, turn the Type = "submit" submit button, change it to "Button", then use the onclick to call the JS function to implement the submission of the form, the shield Enter key, as follows: < Form name = "form1" οnkeydοwn = 'i (event.keycode == 13) Return false; event.returue = false;'>