<script>
//回车事件 onkeydown:点击键盘
document.onkeydown=function myAction(){
//网页内按下回车触发
if(event.keyCode==13)//keycode代表键盘按钮的代码 13是enter是代码
{
document.getElementById("search").click();//search:要调用的方法
return false;
}
}
</script>