DOMContentLoaded 与 onload的区别
2009-04-27 18:12
337 查看
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
相关文章推荐
- 关于HTML页面DOMContentLoaded和Window.onload区别
- DOMContentLoaded和onload事件的区别
- DOM Ready之 document.ready和onload的区别
- Window.onLoad 和 DOMContentLoaded事件的先后顺序
- 事件DOMContentLoaded和load的区别
- Jquery知识点一 Jquery的ready和Dom的onload的区别
- jquery中的$(document).ready()、JavaScript中的window.onload()以及body中的onload()、DomContentLoaded()区别
- js中DOMContentLoaded和load的区别
- js中DOMContentLoaded和load的区别
- js中DOMContentLoaded和load的区别
- 事件DOMContentLoaded和load的区别
- Jquery知识点一 Jquery的ready和Dom的onload的区别
- Jquery的ready和Dom的onload的区别及freemarker分页
- js中DOMContentLoaded和load的区别
- 比onload更快的DOMContentLoaded,readystatechange,doscroll的DOM加载事件
- window.onload 、body.onload 以及 jQuery 等dom加载完成后执行脚本的区别
- Jquery的ready和Dom的onload的区别
- DOMContentLoaded和window.onload
- DOMContentLoaded与 onload的区别
- 事件DOMContentLoaded和load的区别