load与DOMContentLoaded之间的差异 [英] Difference between load vs DOMContentLoaded

查看:69
本文介绍了load与DOMContentLoaded之间的差异的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


可能重复:

DOMContentLoaded和Load事件之间的差异

什么是之间的区别

window.addEventListener("load", load, false);

document.addEventListener("DOMContentLoaded", load, false);

推荐答案


  • DOMContentLoaded - 已加载整个文档(HTML)。

  • load - 已加载整个文档及其资源(例如图像,iframe,脚本)。

    • DOMContentLoaded - the whole document (HTML) has been loaded.
    • load - the whole document and its resources (e.g. images, iframes, scripts) have been loaded.
    • 这篇关于load与DOMContentLoaded之间的差异的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆