WEB DEVELOPER SITE
HTMLCSSJAVASCRIPTSQLPHPBOOTSTRAPJQUERYANGULARXML
 

HTML DOM Script Object


Script Object

The Script object represents an HTML <script> element.

Access a Script Object

You can access a <script> element by using getElementById():

var x = document.getElementById("myScript");

Create a Script Object

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

var x = document.createElement("SCRIPT");

Script Object Properties

= Property included HTML5.

Property Description
async Sets or returns whether a content ought to be executed nonconcurrently as before long as it is available
charset Sets or returns the estimation of the charset trait of a script
crossOrigin Sets or returns the CORS settings of a script
defer Sets or returns whether a content ought to be executed when the page has completed parsing
src Sets or returns the estimation of the src trait of a script
text Sets or returns the substance of all the content hubs that are offspring of a script
type Sets or returns the estimation of the sort property of a script