May 06, 2021 JavaScript with HTML DOM Reference book
4. Standard properties and events
The Script object represents an HTML-lt;script.gt; element.
You can use getElementById() to access the elements:
var x = document.getElementById("myScript"); try it
You can use the document.createElement() method to create an element of the .lt;script?gt;
var x = document.createElement("SCRIPT"); try it
New properties in HTML5.
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. |