HTML DOM Column Object

Column Object The Column object represents an HTML <col> element. Access a Column Object You can access a <col> element by using getElementById(): Example var x = document.getElementById(“myCol”); Try it Yourself » Create a Column Object You can create a <col> element by using the document.createElement() method: var x = document.createElement(“COL”); Column Object Properties Property Description span […]

HTML DOM Script Object

The Script object represents an HTML <script> element. Access a Script Object You can access a <script> element by using getElementById(): Example var x = document.getElementById(“myScript”); Try it Yourself » Tip: You can also access a <script> element by using the scripts collection. Create a Script Object You can create a <script> element by using the document.createElement() method: Example […]

HTML DOM Object Object

Object Object The Object object represents an HTML <object> element. Access an Object Object You can access an <object> element by using getElementById(): Example var x = document.getElementById(“myObject”); Try it Yourself » Create an Object Object You can create an <object> element by using the document.createElement() method: Example var x = document.createElement(“OBJECT”); Try it Yourself » Object […]

HTML DOM Link Object

Link Object The Link object represents an HTML <link> element. Access a Link Object You can access a <link> element by using getElementById(): Example var x = document.getElementById(“myLink”); Try it Yourself » Create a Link Object You can create a <link> element by using the document.createElement() method: Example var x = document.createElement(“LINK”); Try it Yourself » Link […]

HTML DOM Form Object

Form Object The Form object represents an HTML <form> element. Access a Form Object You can access a <form> element by using getElementById(): Example var x = document.getElementById(“myForm”); Try it Yourself » Tip: You can also access a <form> element by using the forms collection. Create a Form Object You can create a <form> element by using the document.createElement() […]

HTML DOM Div Object

Div Object The Div object represents an HTML <div> element. Access a Div Object You can access a <div> element by using getElementById(): Example var x = document.getElementById(“myDIV”); Try it Yourself » Create a Div Object You can create a <div> element by using the document.createElement() method: Example var x = document.createElement(“DIV”); Try it Yourself » Div […]