Home >Web Front-end >JS Tutorial ><script defer> What does defer mean_Basic knowledge

<script defer> What does defer mean_Basic knowledge

WBOY
WBOYOriginal
2016-05-16 18:53:13924browse

After the program is downloaded, it is parsed and executed.
The document says that the code in defer will not be executed immediately, and the page will continue to load. So when will the code in defer be executed? After all the javascript code is loaded? After the page loads? Before or after onload?

The answer is:

It does not mean that it will not be executed when the web page is loaded. You can write a SCRIPT on the web page and then define it, but it will still be executed when loading,
Later, when I was looking for other stuff, I found that because it didn’t have a subtitle, I didn’t know how to use it.
It turns out that after your webpage has been intercepted, you want to dynamically add a new one




Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn