简体   繁体   中英

Use of data-main attribute in script

I can not understand the data-main attribute in the script element. Can some one please explain it with an example? Why is it used?

data-* attributes allow arbitrary custom data to be added to HTML elements for custom code (usually client side JS) to process. The specific values are not standardised.

What the data-main attribute does is probably determined by the script specified by the src attribute.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM