<body onkeydown="_key()">

<a id="enter">登录</a>

<script language="javascript"> function _key() { if(event.keyCode==13) document.getElementById("enter").click(); }</script>