HTML 中DOM加载完监听

Posted by cl9000 on May 14, 2017
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// jquery 

$(document).ready(function(){
console.log("ready! - 000");
}),

$(function() {
console.log("ready! - 001");
});

jQuery(document).ready(function(t) {
console.log("ready! - 002");
}),

$().ready(function() {
console.log("ready! - 003");
})

// js
$(window).on("load", function() {
console.log("window loaded! 1");
})

function winOnload() {
console.log("window loaded! 985 ========");
}
window.onload = winOnload();

window.onload = function () {
console.log("window loaded! 211 ========");
}

关注【公众号】,了解更多。



支付宝打赏 微信打赏

赞赏一下 坚持原创技术分享,您的支持将鼓励我继续创作!