AmitDiwan has Published 10740 Articles

HTML DOM Section Object

AmitDiwan

AmitDiwan

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

273 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

123 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

175 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

145 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

158 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

135 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

HTML DOM scripts Collection

AmitDiwan

AmitDiwan

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

267 Views

The HTML DOM Script collection returns the collection of all elements of an HTML document.SyntaxFollowing is the syntax −document.scriptsProperty of script objectPropertyExplanationlengthIt returns the number of element in the collection in a HTML document.Methods of script objectMethodExplanation[index]It returns the specified index element from the collection.item(index)It returns the ... Read More

HTML DOM setNamedItem() Method

AmitDiwan

AmitDiwan

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

185 Views

The DOM setNamedItem() method set a node specified in its parameter to an attribute node using its name in an HTML document.SyntaxFollowing is the syntax −node.setNamedItem(node);ExampleLet us see an example of setNamedItem() method − Live Demo    html{       height:100%;    }    body{     ... Read More

HTML DOM removeNamedItem() Method

AmitDiwan

AmitDiwan

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

135 Views

The HTML DOM removeNamedItem() method removes the node specified in its parameter from an attribute node using its name in an HTML document.SyntaxFollowing is the syntax −node.removeNamedItem(node);ExampleLet us see an example of removeNamedItem() method − Live Demo    html{       height:100%;    }    body{   ... Read More

HTML DOM readyState Property

AmitDiwan

AmitDiwan

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

197 Views

The DOM readyState property returns the loading status of the current HTML document.SyntaxFollowing is the syntax −document.readyStateExampleLet us see an example of readyState property − Live Demo    html{       height:100%;    }    body{       text-align:center;       color:#fff;       ... Read More

Advertisements