<form name="f1" action="http://www.google.com" > <input type="submit" > </form> <script> document.onkeyup=function(evt){ evt=window.event------解决方案--------------------evt; if(evt.keyCode==13){ document.forms[0]&&document.forms[0].submit(); } } </script>