AmitDiwan has Published 11365 Articles

HTML DOM previousSibling Property

AmitDiwan

AmitDiwan

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

65 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

70 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 removeChild() Method

AmitDiwan

AmitDiwan

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

88 Views

The DOM removeChild() method returns and remove the specified child node of the specified node in an HTML document.SyntaxFollowing is the syntax −node.removeChild(node);ExampleLet us see an example of removeChild() method − Live Demo    html{       height:100%;    }    body{       text-align:center;   ... Read More

HTML DOM Pre Object

AmitDiwan

AmitDiwan

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

89 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

151 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 removeAttribute() Method

AmitDiwan

AmitDiwan

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

61 Views

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

HTML DOM removeAttributeNode() Method

AmitDiwan

AmitDiwan

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

67 Views

The HTML DOM removeAttributeNode() method removes the attribute specified in its parameter from the specified element in an HTML document and return the removed attribute as an Attr Node Object.SyntaxFollowing is the syntax −node.removeAttributeNode(attributeNode);ExampleLet us see an example of removeAttributeNode() method − Live Demo    html{     ... Read More

HTML DOM setAttributeNode() Method

AmitDiwan

AmitDiwan

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

79 Views

The DOM setAttributeNode() method set an attribute specified in its parameter to a specified element in an HTML document and return the value as an Attr Node Object.SyntaxFollowing is the syntax −node.setAttributeNode(attributeNode);ExampleLet us see an example of setAttributeNode() method − Live Demo    html{       height:100%; ... Read More

HTML DOM setNamedItem() Method

AmitDiwan

AmitDiwan

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

90 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

65 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

Advertisements