HTML | DOM Script Object Last Updated : 04 Oct, 2019 Comments Improve Suggest changes Like Article Like Report The DOM Script Object is used to represent the HTML <script> element. The script element is accessed by getElementById(). Properties: async: It is used to specify the script is executed asynchronously. charset: It is used to specify the character encoding used in an external script file. defer: It is used to specify that the script is executed when the page has finished parsing. src: It is used to specify the URL of an external script file. type: It is used to specify the media type of the script. Syntax: document.getElementById("ID"); Where “id” is the ID assigned to the “script” tag. Example-1: html <!DOCTYPE html> <html> <head> <style> body { text-align: center; } h1 { color: green; } </style> </head> <body> <h1>GeeksForGeeks</h1> <h2>DOM Script Object </h2> <!-- Assigning id to script. --> <script id="GFG"> Hello GeeksForGeeks! </script> <br> <br> <button onclick="myGeeks()">Submit</button> <p id="sudo"></p> <script> function myGeeks() { // Accessing script object var g = document.getElementById( "GFG").text; document.getElementById( "sudo").innerHTML = g; } </script> </body> </html> Output: Before Clicking On Button: After Clicking On Button : Example-2: Script Object can be created by using the document.createElement Method. html <!DOCTYPE html> <html> <head> <style> body { text-align: center; } h1 { color: green; } </style> </head> <body> <h1>GeeksForGeeks</h1> <h2>DOM Script Object </h2> <button onclick="myGeeks()"> Submit </button> <script> function myGeeks() { // Creating 'script' object. var g = document.createElement("SCRIPT"); var f = document.createTextNode("alert( 'Hello GeeksForGeeks')"); g.appendChild(f); document.body.appendChild(g); } </script> </body> </html> Output: Before Clicking On Button : After Clicking On Button: Supported Browser: The browser supported by DOM Script Object are listed below: Google Chrome Internet Explorer Firefox Safari Opera Comment More infoAdvertise with us M manaschhabra2 Follow Improve Article Tags : Misc Web Technologies HTML HTML-DOM Practice Tags : Misc Similar Reads HTML DOM TransitionEvent propertyName Property The TransitionEvent propertyName property is a read-only property and used for returning the name of the CSS property associated with a transition when a transitionevent occurs. Syntax :event.propertyNameReturn Value: It returns a string representing the transition's name. Example: In this example, 1 min read HTML | DOM Style outlineColor Property The DOM Style outlineColor Property is used to sets or returns the color of the outline around an Element. Syntax: It is used to Return the outlineColor propertyobject.style.outlineColor it is used to Set the outlineColor propertyobject.style.outlineColor = "color|invert|initial|inherit" Property Va 2 min read HTML | DOM touchmove Event The touchmove event is used to execute a script when the user moves the finger across the screen. It works only on touch screen devices and triggers once for every movement and continues to trigger until the finger is released.Supported Tags All HTML elements supported by this event. Syntax: object. 1 min read HTML | DOM Style isolation Property The DOM Style isolation Property defines whether an element must necessarily create a new stacking context. Syntax: Return isolation syntax:object.style.isolationSet isolation syntax:object.style.isolation = "auto|isolate|initial|inherit" Properties: auto: It is the default property value. Using thi 3 min read HTML | DOM TouchEvent metaKey Property The TouchEvent metaKey property is a read-only property and used for returning a Boolean value which indicates whether or not the "meta" key was pressed when a touch event triggered. It mostly returns false because generally, touch devices do not have a meta key. Syntax: event.metaKey Return Value: 2 min read HTML | DOM TouchEvent shiftKey Property The TouchEvent shiftKey property is a read-only property and used for returning a Boolean value which indicates whether or not the "shift" key was pressed when a touch event was triggered. The TouchEvent shiftKey property mostly returns false because generally, touch devices do not have a shift key. 2 min read HTML | DOM Style columnRuleColor Property The DOM Style columnRuleColor property specifies the color of the rule between columns. Syntax : For set the columnRuleColor property: object.style.columnRuleColor = "color|initial|inherit" For return the columnRuleColor property: object.style.columnRuleColor Property Values: color: Used to specify 5 min read HTML | DOM touchend Event The touchend event is used to execute a script when a user removes his finger from an element. It will only work on devices with a touch screen. Supported Tags All HTML element supported by this event. Syntax: object.ontouchend = myScript; Below program illustrates the touchend event : Example-1: Ex 1 min read HTML DOM Form Object The Form Object in HTML DOM is used to represent the HTML < form > element. This tag is used to set or get the properties of < form > element. This element can be accessed by using getElementById() method. Syntax: document.getElementById("Form_ID"); Note: This Form_ID is assigned to HTML 2 min read HTML DOM Style textDecoration Property The HTML DOM Style textDecoration property is used to set one or more decorations for a text. We can specify one or more text decorations for a text separated by spaces. It returns the textDecoration property that is given to the text. SyntaxIt returns the textDecoration property. object.style.textD 2 min read Like