打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
DOMContentLoaded 与 onload的区别
1.DOMContentLoaded
DOMContentLoaded是
FF,Opera 9的特有的Event, 当所有DOM解析完以后会触发这个事件。
jquery的ready(示例:$("selector).ready(function(){})) ,MT的onDomReady
IE下是scrollleft事件可以时就表示DomcontentLoaded: var temp = document.createElement('div');temp.doScroll('left');
Fired on a Window object when a document's DOM content is finished loading, but unlike "load", does not wait until all images are loaded. Used for example by GreaseMonkey to sneak in to alter pages before they are displayed.
This event, as many others on this page, is dispatched to "trusted" targets only; for example, it is not dispatched to the content of the main browser object in Firefox, even if it comes from a chrome:/ URI.
2.Onload
 onload要等到所有页面元素加载完成才会触发, 包括页面上image、flash、iframe等内容都加载完毕才会执行
参考:
1.https://developer.mozilla.org/en/Gecko-Specific_DOM_Events
 
本文来自CSDN博客,转载请标明出处:http://blog.csdn.net/beimuaihui/archive/2009/04/27/4130275.aspx
本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
【热】打开小程序,算一算2024你的财运
事件DOMContentLoaded和load的区别
页面加载事件
JS DOMReady事件的六种实现方式
DOMContentLoaded与load的区别
DOMContentLoaded事件
使用FileReader对象的readAsDataURL方法来读取图像文件
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服