Found 2416 Articles for HTML

HTML DOM nodeName Property

AmitDiwan
Updated on 25-Oct-2019 07:48:01

113 Views

The HTML DOM nodeName property returns a string corresponding to the name of the node.Following is the syntax −Returning string valueNode.nodeNameHere, the return value can be the following −Tag name in uppercase for element nodesName of the attribute for attribute nodes‘#comment’ for comment nodes‘#document’ for comment nodes‘#text’ for text nodesNOTE: Whitespaces are considered as text nodes only.Let us see an example of HTML DOM nodeName property −Example Live Demo HTML DOM nodeName    form {       width:70%;       margin: 0 auto;       text-align: center;    }    * {       ... Read More

HTML DOM nextSibling Property

AmitDiwan
Updated on 25-Oct-2019 07:44:46

153 Views

The HTML DOM nextSibling property returns the element node which is immediately following specified element node.NOTE: This property does not ignore text and comment nodes.Following is the syntax −Returning nextSibling nodenodeList.nextSiblingLet us see an example of HTML DOM nextSibling property −Example Live Demo HTML DOM nextSibling    form {       width:70%;       margin: 0 auto;       text-align: center;    }    * {       padding: 2px;       margin:5px;    }    input[type="button"] {       border-radius: 10px;    }    ul{       width: 30%;   ... Read More

HTML DOM nextElementSibling Property

AmitDiwan
Updated on 25-Oct-2019 07:39:20

109 Views

The HTML DOM nextElementSibling property returns the element node which is immediately following specified element node.NOTE: This property does ignore text and comment nodes.Following is the syntax −Returning nextElementSibling nodenodeList.nextElementSiblingLet us see an example of HTML DOM nextElementSibling property −Example Live Demo HTML DOM nextElementSibling    form {       width:70%;       margin: 0 auto;       text-align: center;    }    * {       padding: 2px;       margin:5px;    }    input[type="button"] {       border-radius: 10px;    }    ul{       width: 30%;     ... Read More

HTML DOM Nav Object

AmitDiwan
Updated on 25-Oct-2019 07:34:16

185 Views

The HTML DOM Nav Object in HTML represents a element.Let us see an example of HTML DOM Nav object −Example Live Demo HTML DOM Nav    * {       padding: 2px;       margin:5px;    }       form {       width:70%;       margin: 0 auto;       text-align: center;    }    input[type="button"] {       border-radius: 10px;    }                    HTML-DOM-Nav                         ... Read More

HTML DOM name Property

AmitDiwan
Updated on 25-Oct-2019 07:26:33

130 Views

The HTML DOM name property returns a string corresponding to the name of the attribute of an element.Following is the syntax −Returning string valueelementAttribute.nameLet us see an example of HTML DOM name property − Live Demo HTML DOM name    * {       padding: 2px;       margin:5px;    }    form {       width:70%;       margin: 0 auto;       text-align: center;    }    input[type="button"] {       border-radius: 10px;    }                    HTML-DOM-name   ... Read More

HTML DOM MouseEvent Object

AmitDiwan
Updated on 25-Oct-2019 07:20:32

356 Views

The HTML DOM MouseEvent Object represents an event which incurs on interaction of mouse with the HTML document elements.Here, “MouseEvent” can have the following properties and methods −Property/MethodDescriptionaltKeyItreturns whether the "ALT" key on keyboard was pressedwhen the mouse event was triggeredbuttonItreturns a number corresponding to which mouse button was pressedwhen the mouse event was triggeredbuttonsItreturns which mouse buttons were pressed when the mouse event wastriggeredclientXItreturns the horizontal (x) coordinate of the mouse pointer, relative to the current window, when the mouse event was triggeredclientYItreturns the vertical (y) coordinate of the mouse pointer, relativeto the current window, when the mouse event ... Read More

HTML DOM MouseEvent screenY Property

AmitDiwan
Updated on 25-Oct-2019 06:54:17

59 Views

The HTML DOM MouseEvent screenY property returns the vertical (y) coordinate of the mouse pointer relative to the users screen display if a mouse event was triggered. Use with screenY to get the horizontal coordinate as well.Following is the syntax −Returning reference to the screenY objectMouseEventObject.screenYLet us see an example of MouseEvent screenY property −Example Live Demo MouseEvent screenY    * {       padding: 2px;       margin:5px;    }    form {       width:70%;       margin: 0 auto;       text-align: center;    }    #outer {     ... Read More

HTML DOM MouseEvent screenX Property

AmitDiwan
Updated on 24-Oct-2019 12:33:14

63 Views

The HTML DOM MouseEvent screenX property returns the horizontal (x) coordinate of the mouse pointer relative to the users screen display if a mouse event was triggered. Use with screenY to get the vertical coordinate as well.Following is the syntax −Returning reference to the screenX objectMouseEventObject.screenXLet us see an example of MouseEvent screenX property −Example Live Demo MouseEvent screenX    * {       padding: 2px;       margin:5px;    }    form {       width:70%;       margin: 0 auto;       text-align: center;    }    #outer {     ... Read More

HTML DOM MouseEvent relatedTarget

AmitDiwan
Updated on 24-Oct-2019 12:28:44

68 Views

The HTML DOM MouseEvent relatedTarget property returns the corresponding element that triggered the respective mouseover or mouseout event.Following is the syntax −Returning reference to the relatedTarget objectMouseEventObject.relatedTargetLet us see an example of MouseEvent relatedTarget property −Example Live Demo MouseEvent relatedTarget    * {       padding: 2px;       margin:5px;    }    form {       width:70%;       margin: 0 auto;       text-align: center;    }    #outer {       width:70%;       margin: 0 auto;       padding: 0;       text-align: center;   ... Read More

HTML DOM MouseEvent pageY Property

AmitDiwan
Updated on 24-Oct-2019 12:24:33

49 Views

The HTML DOM MouseEvent pageY property returns the vertical (y) coordinate of the mouse pointer relative to the document if a mouse event was triggered. Use with pageX to get the horizontal coordinate as well.Following is the syntax −Returning reference to the pageY objectMouseEventObject.pageYLet us see an example of MouseEvent pageY property −Example Live Demo MouseEvent pageY    * {       padding: 2px;       margin:5px;    }    form {       width:70%;       margin: 0 auto;       text-align: center;    }    #outer {       width:70%; ... Read More

Advertisements