Skip to content

31.请指出 document load 和 document ready 的区别? #31

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
webVueBlog opened this issue Mar 13, 2020 · 2 comments
Open

31.请指出 document load 和 document ready 的区别? #31

webVueBlog opened this issue Mar 13, 2020 · 2 comments
Labels
html html

Comments

@webVueBlog
Copy link
Member

No description provided.

@webVueBlog webVueBlog added the html html label Mar 13, 2020
@webVueBlog
Copy link
Member Author

共同点:

这两种事件都代表的是页面文档加载时触发。

异同点:

ready 事件的触发,表示文档结构已经加载完成
(不包含图片等非文字媒体文件)。

onload 事件的触发,表示页面包含图片等文件在内的所有元素都加载完成。

@webVueBlog
Copy link
Member Author

Thing in common:

Both of these events are triggered when the page document is loaded.

Similarities and differences:

The trigger of the ready event indicates that the document structure has been loaded
(non - text media such as pictures are not included).

The trigger of the onload event means that all elements of the page, including files such as pictures, have been loaded.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
html html
Projects
None yet
Development

No branches or pull requests

1 participant