HTML DOM Script object
Script object
The Script object represents an HTML-lt;script.gt; element.
Access the Script object
You can use getElementById() to access the elements:
Create a Script object
You can use the document.createElement() method to create an element of the .lt;script?gt;
Script object properties
Attributes | describe |
---|---|
async | Set or return to whether or not to perform scripts (once the script is available). |
charset | Set or return the value of the CHARSET property of the script. |
defer | Set or return to execute the script when the page is completed. |
src | Set or return the value of the SRC property of the script. |
text | Set or return all sub-text nodes of the script. |
type | Set or return the value of the TYPE attribute of the script. |
Standard properties and events
Script objects also support standard properties and events.
Related articles
HTML Reference Manual: HTML slt;script> Tags