取消页面按钮的enter按下事件

  <script src="../../@Javascript/jquery-1.8.1.js"></script>
  
    <script language="javascript" type="text/javascript">
        $(function () {
            $("*").each(function () {
                $(this).keypress(function (e) {
                    var key = window.event ? e.keyCode : e.which;
                    if (key.toString() == "13") {
                        return false;
                    }
                });
            });
        });
    </script>

posted @ 2014-10-17 10:26  Jerry很简单  阅读(258)  评论(0编辑  收藏  举报