AmitDiwan has Published 10744 Articles

HTML DOM Select add() Method

AmitDiwan

AmitDiwan

Updated on 30-Jul-2019 22:30:26

168 Views

The HTML DOM select add() method adds a new option to a drop-down list in an HTML document.SyntaxFollowing is the syntax −object.add(option, index)ExampleLet us see an example of HTML DOM select add() method − Live Demo    html{       height:100%;    }    body{     ... Read More

HTML DOM Select remove() Method

AmitDiwan

AmitDiwan

Updated on 30-Jul-2019 22:30:26

129 Views

The HTML DOM select remove() method removes a new option from a drop-down list in an HTML document.SyntaxFollowing is the syntax −object.remove(index)Here, index represents the index of the option which is to be removed from the drop-down list.ExampleLet us see an example of HTML DOM select remove() method − Live Demo ... Read More

HTML DOM Option Object

AmitDiwan

AmitDiwan

Updated on 30-Jul-2019 22:30:26

229 Views

The HTML DOM option Object represent the element of an HTML document.Let us now see how to create option object −SyntaxFollowing is the syntax −document.createElement(“OPTION”);PropertiesFollowing are the properties of option Object −PropertyExplanationdisabledIt returns and modify whether the option element is disabled or not.defaultSelectedIt returns the default value of option ... Read More

HTML DOM Samp Object

AmitDiwan

AmitDiwan

Updated on 30-Jul-2019 22:30:26

157 Views

The HTML DOM Samp Object represent the element of an HTML document.Let us create a samp object −SyntaxFollowing is the syntax −document.createElement(“SAMP”);ExampleLet us see an example of samp object − Live Demo    body{       text-align:center;       background-color:#fff;       color:#0197F6;   ... Read More

HTML DOM Section Object

AmitDiwan

AmitDiwan

Updated on 30-Jul-2019 22:30:26

248 Views

The HTML DOM Section Object represent the element of an HTML document.Let us create section objectSyntaxFollowing is the syntax −document.createElement(“SECTION”);ExampleLet us see an example of HTML DOM section object − Live Demo    body{       text-align:center;       background-color:#fff;       color:#0197F6;   ... Read More

HTML DOM Option defaultSelected Property

AmitDiwan

AmitDiwan

Updated on 30-Jul-2019 22:30:26

105 Views

The HTML DOM option defaultSelected property returns the default value of option element in an HTML document.SyntaxFollowing is the syntax −object.defualtSelectedExampleLet us see an example of defaultSelected property − Live Demo    html{       height:100%;    }    body{       text-align:center;       ... Read More

HTML DOM PopStateEvent Object

AmitDiwan

AmitDiwan

Updated on 30-Jul-2019 22:30:26

146 Views

The HTML DOM popStateEvent object is an event handler for the popstate event which occurs when window’s history changes.Property of PopStateEventPropertyExplanationstateIt returns an object that represents a copy of the history entries.ExampleLet us see an example of HTML DOM popStateEvent Object − Live Demo    html{     ... Read More

HTML DOM previousSibling Property

AmitDiwan

AmitDiwan

Updated on 30-Jul-2019 22:30:26

128 Views

The DOM previousSibling property returns the previous node in the same tree level of the specified node in an HTML document.SyntaxFollowing is the syntax −node.previousSiblingExampleLet us see an example of previousSibling property − Live Demo    html{       height:100%;    }    body{       ... Read More

HTML DOM previousElementSibling Property

AmitDiwan

AmitDiwan

Updated on 30-Jul-2019 22:30:26

137 Views

The HTML DOM previousElementSibling property returns the previous element in the same tree level of the specified element in an HTML document.SyntaxFollowing is the syntax −node.previousElementSiblingExampleLet us see an example of previousElementSibling property − Live Demo    html{       height:100%;    }    body{     ... Read More

HTML DOM Pre Object

AmitDiwan

AmitDiwan

Updated on 30-Jul-2019 22:30:26

122 Views

The HTML DOM Pre Object represent the element of an HTML document.Create pre objectSyntaxFollowing is the syntax:document.createElement(“PRE”);ExampleLet us see an example of pre object − Live Demo    body{       text-align:center;       background-color:#fff;       color:#0197F6;    }    h1{     ... Read More

Advertisements