Different browsers have different default behaviors about what to do when the user hits enter in a form. MSIE almost always submits the form, while Netscape will often just beep at you. Although it’s usually best to leave the default browser behavior as it is, for some forms people just naturally tend to hit “enter” when they are ready. This is particularly true for login forms. With a little JavaScript we can set the form to submit on enter.
First, copy this script exactly as-is into the <HEAD>
section of your document:
For each field which should submit the form when they hit enter add an onKeyPress
attribute like this: