Found 2202 Articles for HTML

HTML DOM timeStamp Event Property

AmitDiwan
Updated on 21-Dec-2021 10:19:12

252 Views

The HTML DOM timeStamp property returns elapsed time in milliseconds of when the event was created or triggered.Note: The timeStamp only works if the event system supports it for the particular event.Following is the syntax −Returning time value (in milliseconds)event.timeStampLet us see an example of HTML DOM timeStamp property −Example timeStamp Event    * {       padding: 2px;       margin:5px;    }    form {       width:70%;       margin: 0 auto;       text-align: center;    }    #outer {       width:70%;       margin: ... Read More

HTML DOM Time Object

AmitDiwan
Updated on 29-Oct-2019 07:23:04

190 Views

The HTML DOM Time Object in HTML represents the element.Creating a elementvar timeObject = document.createElement(“TIME”)Here, “timeObject” can have the following properties −PropertyDescriptiondateTimeItsets/returns the value of the dateTime attribute of a elementLet us see an example of Time dateTime property −Example Live Demo Time dateTime    form {       width:70%;       margin: 0 auto;       text-align: center;    }    * {       padding: 2px;       margin:5px;    }    input[type="button"] {       border-radius: 10px;    }           ... Read More

HTML DOM Time dateTime Property

AmitDiwan
Updated on 29-Oct-2019 07:13:11

105 Views

The HTML DOM Time dateTime property returns/sets datetime attribute of time element.Following is the syntax −Returning string valuetimeObject.dateTimeSetting dateTime to string valuetimeObject.dateTime = YYYY-MM-DDThh:mm:ssTZDHere, “YYYY-MM-DDThh:mm:ssTZD” can be the following −stringValueDetailsYYYYIt defines year (eg:1998)MMIt defines month (eg: 05 for May)DDIt defines Day (eg: 24)TIt is a separator for date and timehhIt defines hour (eg:12)mmIt defines minutes (eg:48)ssIt defines seconds (eg:00)TZDTime Zone Designator (IST denotes Indian StandardTime)Let us see an example of Time dateTime property −Example Live Demo Time dateTime    form {       width:70%;       margin: 0 auto;       text-align: center;    } ... Read More

HTML DOM Ol type Property

AmitDiwan
Updated on 29-Oct-2019 06:58:48

137 Views

The HTML DOM Ol type property sets/returns the value of the type attribute which corresponds to the type of marker used in an ordered list.Following is the syntax −Returning type propertyolObject.typeSetting type to a characterolObject.type = ‘1|a|A|i|I’Let us see an example of Ol type property −Example Live Demo HTML DOM Ol type    form {       width:70%;       margin: 0 auto;       text-align: center;    }    * {       padding: 2px;       margin:5px;    }    input[type="button"] {       border-radius: 10px;    }    ol{ ... Read More

HTML DOM Ol start Property

AmitDiwan
Updated on 29-Oct-2019 06:54:57

116 Views

The HTML DOM Ol start property sets/returns the value of the start attribute of an ordered list.Following is the syntax −Returning number valueolObject.startSetting start to numberolObject.start = numberLet us see an example of Ol start property −Example Live Demo HTML DOM Ol start    form {       width:70%;       margin: 0 auto;       text-align: center;    }    * {       padding: 2px;       margin:5px;    }    input[type="button"] {       border-radius: 10px;    }    ol{       width: 30%;       margin: ... Read More

HTML DOM Ol reversed Property

AmitDiwan
Updated on 29-Oct-2019 06:50:55

149 Views

The HTML DOM Ol reversed property sets/returns whether the order of list should be descending or ascending (default).Following is the syntax −Returning boolean value - true/falseolObject.reversedSetting reversed to booleanValueolObject.reversed = booleanValueHere, “booleanValue” can be the following −booleanValueDetailstrueIt defines that order willbe descendingfalseIt defines that order willbe ascending which is defaultLet us see an example of Ol reversed property −Example Live Demo HTML DOM Ol reversed    form {       width:70%;       margin: 0 auto;       text-align: center;    }    * {       padding: 2px;       margin:5px;    } ... Read More

HTML DOM Ol Object

AmitDiwan
Updated on 29-Oct-2019 06:45:59

176 Views

The HTML DOM Ol Object in HTML represents the element.Creating a elementvar olObject = document.createElement(“OL”)Here, “olObject” can have the following properties −PropertyDescriptionreversedItsets/returns whether the order of list should be descending orascending (default)startItsets/returns the value of the start attribute of an ordered listtypeItsets/returns the value of the type attribute of an ordered listLet us see an example of Ol start property −Example Live Demo HTML DOM Ol start    form {       width:70%;       margin: 0 auto;       text-align: center;    }    * {       padding: 2px;     ... Read More

HTML DOM Object Object

AmitDiwan
Updated on 25-Oct-2019 08:20:52

292 Views

The HTML DOM Object Object in HTML represents the  element.Creating an elementvar objectElement = document.createElement(“OBJECT”)Here, “objectElement” can have the following properties −PropertyDescriptiondataItsets/returns the URL of the resource being used by the objectelementformItreturns a reference to the enclosing form of the object elementheightItsets/returns the height of the object elementnameItsets/returns the name of the object elementtypeItsets/returns the content type for data downloaded via the dataattributeuseMapItsets/returns the name of a client-side image map to be used withthe object elementwidthItsets/returns the width of the object elementLet us see an example of HTML DOM Object Object property −Example Live Demo HTML DOM Object ... Read More

HTML DOM Object form Property

AmitDiwan
Updated on 25-Oct-2019 08:15:08

209 Views

The HTML DOM Object form property returns the reference of enclosing form for element.Following is the syntax −Returning reference to the form objectObjectElement.formLet us see an example of Object form property −Example Live Demo HTML DOM Object form    form {       width:70%;       margin: 0 auto;       text-align: center;    }    * {       padding: 2px;       margin:5px;    }    input[type="button"] {       border-radius: 10px;    }                    HTML-DOM-Object-form                                            var divDisplay = document.getElementById("divDisplay");    var objSelect = document.getElementById("objSelect");    function getObjectForm() {       divDisplay.textContent = 'Location of above picture: '+objSelect.form.id;    } OutputBefore clicking ‘Get location of pic in website’ button −After checking ‘Get location of pic in website’ button −

HTML DOM Object data Property

AmitDiwan
Updated on 25-Oct-2019 08:12:24

123 Views

The HTML DOM Object data property returns a string corresponding to the value of the attribute data.Following is the syntax −Returning string valueObjectElement.dataSet data property to a string valueObjectElement.data = URLStringLet us see an example of HTML DOM Object data property −Example Live Demo HTML DOM Object data    form {       width:70%;       margin: 0 auto;       text-align: center;    }    * {       padding: 2px;       margin:5px;    }    input[type="button"] {       border-radius: 10px;    }                    HTML-DOM-Object-data                                                          var divDisplay = document.getElementById("divDisplay");    var objSelect = document.getElementById("objSelect");    function getObjectData() {       objSelect.data       divDisplay.textContent = 'URL of above picture: '+objSelect.data;    } OutputBefore clicking ‘Get URL’ button −After clicking ‘Get URL’ button −

Advertisements