<html>
<head> <script language='javascript'> function onEnterDown(){ if(window.event.keyCode == 13){ onButOk(); } } function onButOk(){ --按钮的事件; } </script> </head> <body οnkeydοwn='onEnterDown();'> <input id="ButOk" type="button" accesskey="" value="登录" οnclick="onButOk()" /> </body> </html>