Easy Tutorial
❮ Prop Tabledata Axis Prop Fileupload Accept ❯

HTML DOM Script Object


Script Object

The Script object represents an HTML <script> element.

Accessing a Script Object

You can use the getElementById() method to access a <script> element:

Creating a Script Object

You can use the document.createElement() method to create a <script> element:

Script Object Properties

Property Description
async Sets or returns whether the script should be executed asynchronously (as soon as it is available).
charset Sets or returns the value of the charset attribute of the script.
defer Sets or returns whether the script should be executed after the page has finished parsing.
src Sets or returns the value of the src attribute of the script.
text Sets or returns the content of all child text nodes of the script.
type Sets or returns the value of the type attribute of the script.

Standard Properties and Events

The Script object also supports standard properties and events.


Related Articles

HTML Reference: HTML <script> Tag

❮ Prop Tabledata Axis Prop Fileupload Accept ❯