js enter键激发事件

时间:2014-06-27 22:45:57   收藏:0   阅读:303

document.onkeydown = function (e) {
            if (!e) e = window.event;
            if ((e.keyCode || e.which) == 13) {
                $("#btnSubmit").click();
            }
        }

js enter键激发事件,布布扣,bubuko.com

评论(0)
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!