小编Jol*_*lix的帖子

什么是HTML文档触发的第一个事件?

我很好奇在使用jQuery和jQuery Mobile时首先触发了哪个事件.

奇怪的是,第一个控制台输出我得到的是pagebeforecreate那么document ready然后onload.

我想知道是否有任何其他事件在这些之前被解雇.

http://jsfiddle.net/yYGYe/2/

$('html').bind('pagebeforecreate',function(event) {
    console.log("pagebeforecreate");
});

$(document).ready(function() {
    console.log("document ready");
});

window.onload = function(){
    console.log("onload");
};
Run Code Online (Sandbox Code Playgroud)

html javascript jquery jquery-mobile

11
推荐指数
1
解决办法
3708
查看次数

标签 统计

html ×1

javascript ×1

jquery ×1

jquery-mobile ×1