jQuery 触发回车事件

//触发回车事件  
 function enterEvent(param){
    $("body").keydown(function() {
             if (event.keyCode == "13") {//keyCode=13是回车键
                 $('#'+param).click();
             }
         });

 }
 

猜你喜欢

转载自helloworlda.iteye.com/blog/1329948