function document.onkeydown(){ if (event.keyCode == 13) { event.returnValue=false; event.cancel = true; loginForm.button.click(); } }