繁体   English   中英

jQuery keyup在IE7中不起作用

[英]jQuery keyup not working in IE7

我正在使用jQuery和Datatables插件。 现在,我需要对keyup事件进行一些操作,但是我的网页所设计的浏览器无法正确处理keyup事件。

有任何想法吗?

table.columns().every( function () {
var that = this;
    $("input", this.footer()).on("keyup change", function(){
        if ( that.search() !== this.value ) {
            that
                .search( this.value )
                .draw();
        }
    } );
} );

它在现代浏览器中运行良好,而不是在IE7中。

任何帮助,将不胜感激。

您是否尝试过测试$("input", this.footer()).length>0吗? 似乎无法完全加载DOM。

尝试使用这个:

$(document).ready(function(){
    // Your events binding here
});

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM