HTML DOM Script Objekto
Script object
The Script object represents the HTML <script> element.
Access Script object
You can access the <script> element by using getElementById():
var x = document.getElementById("myScript");
Create Script object
You can create a <script> element by using the document.createElement() method:
var x = document.createElement("SCRIPT");
Script object properties
Atribute | Description |
---|---|
async | Set or return whether the script should be executed asynchronously once it is available. |
charset | Set or return the script's charset attribute value. |
crossOrigin | Set or return the script's CORS settings. |
defer | Set or return whether the script should be executed after the page is fully parsed. |
src | Set or return the script's src attribute value. |
text | Set or return the content of all text nodes that belong to the script subnodes. |
type | Set or return the script's type attribute value. |
Mga Kaugnay na Pahina
HTML Tagalang Balita:HTML <script> Tag