HTML <script>
element is used to embed or reference an executable script.
An insert in html script
tag
<script src="index.js" sync crossorigin="anonymous"></script>
Common attributes:
src
Definition introduces an external scriptURL
type
Definedscript
element contains orsrc
scripting language references,text/javascript
,text/ecmascript
,application/javascript
, inhtml5
, the property can be ignored, it is loaded by defaultJavaScript
- Asynchronous execution of the script async case is in the browser allowed. Boolean value that defaults to
true
, in order tohead
head the external load required to operatedom
the script, you must specify theasync
property defer
This Boolean attribute is set to inform the browser that the script will be resolved after the document is completed, the triggerDOMContentLoaded
execution before the event.crossorigin
Cross-domain attribute,“anonymous"
keyword description will not passcookies
clientSSL
certificates orHTTP
authentication exchange user credentials.