Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Example Analysis of tag attributes and problems left over from History in JavaScript

2025-01-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

Editor to share with you the JavaScript tag attributes and historical issues left over from the example analysis, I believe that most people do not know much about it, so share this article for your reference, I hope you will learn a lot after reading this article, let's go to understand it!

Problems left over by history:

The problems left over by history mainly include:

The relationship between 1.XHTML and HTML

two。 Questions about whether there are browser emoticons that support JavaScript, such as

Tag attribute question:

The main focus is on the issue of loading JS scripts synchronously and asynchronously, involving the src, defer, async properties in

For tags, you can load either embedded tags in the web page or external .js scripts, simply by adding:

As shown above, it is similar to adding a picture link to a HTML on a web page, but usually one of two methods is chosen.

External JS scripts are not only easy to manage, but also avoid repeated downloads of multiple identical resources.

For the loading of external scripts, synchronous and asynchronous problems are often involved.

The so-called synchronization is to load the script while the web page is rendered, which is characterized by slow loading.

Asynchronism means downloading the loading script again after the web page is statically loaded.

Where defer and async are similar but different.

Defer is designed to load the script after the static display of the page, and you can specify the priority.

Async is similar to defer, but does not specify priorities

It is worth noting that dynamic loading of scripts can also be done in the form of create DOM trees, but it should be noted that you can specify whether to load asynchronously or synchronously through async.

The above is all the content of the article "sample Analysis of tag attributes and Historical problems in JavaScript". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report