<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <title>a.htm </title> <script> document.οnkeydοwn=function() //网页内按下回车触发 { if(event.keyCode==13) { document.getElementById("bbb").onclick(); return false; } } </script> </head> <body> <form name=form1> <input type="text" value="" id="aaa" name="aaa" οnclick="alert('1提交')"> <input type="button" value="" id="bbb" name="bbb" οnclick="alert('2提交')"> </form> </body> </html>