当前位置:网站首页>Load and domcontentloaded in JS
Load and domcontentloaded in JS
2022-07-02 01:07:00 【KAMHUNCHAN】
1. load
When the entire page and all dependent resources such as style sheets and images have finished loading , Will trigger load event .
window.addEventListener('load', (event) => {
console.log('page is fully loaded');
});
// You can also use onload Realization :
window.onload = (event) => {
console.log('page is fully loaded');
};
2. DOMContentLoaded
DOM The callback function is triggered when the loading is completed , No need to wait for dependent resources to load .
therefore DOMContenLoaded Will be in load Trigger before .
边栏推荐
- Leetcode skimming: stack and queue 06 (top k high-frequency elements)
- Shell Function
- Excel PivotTable
- [wechat authorized login] the small program developed by uniapp realizes the function of obtaining wechat authorized login
- Leetcode skimming: binary tree 03 (post order traversal of binary tree)
- How to type spaces in latex
- Entrepreneurship is a little risky. Read the data and do a business analysis
- Leetcode skimming: stack and queue 01 (realizing queue with stack)
- sso单点登录的实现。
- How to open an account for individual stock speculation? Is it safe?
猜你喜欢

PLC Analog input analog conversion FB s_ ITR (Mitsubishi FX3U)

969 interlaced string

Synthetic watermelon game wechat applet source code / wechat game applet source code

Creating logical volumes and viewing and modifying attributes for AIX storage management

Excel PivotTable

sso单点登录的实现。

Leetcode skimming: binary tree 03 (post order traversal of binary tree)

一名优秀的软件测试人员,需要掌握哪些技能?

Datawhale 社区黑板报(第1期)

"C zero foundation introduction hundred knowledge hundred examples" (73) anonymous function -- lambda expression
随机推荐
AIX存储管理之卷组的创建(一)
@Valid参数校验不生效
969 interlaced string
Synthetic watermelon game wechat applet source code / wechat game applet source code
PLC Analog input analog conversion FB s_ ITR (Mitsubishi FX3U)
【会议资源】2022年第三届自动化科学与工程国际会议(JCASE 2022)
Shell Function
2023 Lexus ES products have been announced, which makes great progress this time
AIX存储管理之卷组属性的查看和修改(二)
2022 high altitude installation, maintenance and removal of test question simulation test platform operation
How to type spaces in latex
Creating logical volumes and viewing and modifying attributes for AIX storage management
The first "mobile cloud Cup" empty publicity meeting, looking forward to working with developers to create a new world of computing!
MySQL winter vacation self-study 2022 12 (4)
Creation of volume group for AIX storage management (I)
Geek DIY open source solution sharing - digital amplitude frequency equalization power amplifier design (practical embedded electronic design works, comprehensive practice of software and hardware)
Global and Chinese markets for power over Ethernet (POE) solutions 2022-2028: Research Report on technology, participants, trends, market size and share
ACM教程 - 快速排序(常规 + 尾递归 + 随机基准数)
Global and Chinese markets for distributed generation and energy storage in telecommunications networks 2022-2028: Research Report on technology, participants, trends, market size and share
程序员该如何更好的规划自己的职业发展?