<script language='javascript'> document.onkeydown=function(){ if (event.keyCode == 13){ alert('回车键.'); } else{ alert('你按错了键.'); } }</script>