相关疑难解决方法(0)

为什么切换到jQuery 3后我的'load'事件/函数没有被执行?

自从我从升级jQuery 1.x/ jQuery 2.xjQuery 3.x,我现有的代码不会被正确地执行了.一切正常,但load事件监听器不再被触发或有时被触发:

$(function() {
    $(window).on("load", function() {
        // this line will never/occasionally be executed
        console.log("window is loaded!");
    });
});
Run Code Online (Sandbox Code Playgroud)

javascript jquery jquery-plugins jquery-3

4
推荐指数
1
解决办法
984
查看次数

标签 统计

javascript ×1

jquery ×1

jquery-3 ×1

jquery-plugins ×1