常用js操作

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/zhongwenit/article/details/80859406

回车提交

function enterSubmit() {
    //谷歌和IE能识别window.event,火狐使用arguments.callee.caller.arguments[0]
    var theEvent = window.event || arguments.callee.caller.arguments[0];
    var code = theEvent.keyCode;
    if (code == 13) {

    }
}

猜你喜欢

转载自blog.csdn.net/zhongwenit/article/details/80859406