Front End Technology Articles - Page 553 of 860

HTML DOM Input Time Object

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

178 Views

The HTML DOM Input Time Object represents an input HTML element with type Time.SyntaxFollowing is the syntax −Creating an with type timevar timeObject = document.createElement(“input”); timeObject.type = “time”;AttributesHere, “time” can have the following attributes −AttributesDescriptionautocompleteIt defines the value of autocomplete attribute of a time fieldautofocusIt defines if the time field should be focused on initial page load.defaultValueIt sets/returns the default value of time fielddisabledIt defines if time field is disabled/enabledformIt returns a reference of enclosing form that contains the time fieldmaxIt returns/sets the value of max attribute of time fieldminIt returns/sets the value of min attribute of time fieldnameIt ... Read More

HTML DOM Input Time name Property

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

98 Views

The HTML DOM Input Time name property returns a string, which displays the value of the name attribute of input Time. User can also set it to a new string.SyntaxFollowing is the syntax −Returning string valueinputTimeObject.nameSetting name attribute to a string valueinputTimeObject.name = ‘String’ExampleLet us see an example of Input Time name property − Live Demo Input Time name    form {       width:70%;       margin: 0 auto;       text-align: center;    }    * {       padding: 2px;       margin:5px;    }    input[type="button"] {     ... Read More

HTML DOM Input Time min Property

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

161 Views

The HTML DOM Input Time min property returns/sets min attribute of Input Time.SyntaxFollowing is the syntax −Returning string valueinputTimeObject.minSetting max to string valueinputTimeObject.min = hh:mm:ss.msString ValuesHere, “hh:mm:ss.ms” can be the following −stringValueDetailshhIt defines hour (eg:18)mmIt defines minutes (eg:59)ssIt defines seconds (eg:00)msIt defines milli-seconds (eg:700)ExampleLet us see an example of Input Time min property − Input Time min    form {       width:70%;       margin: 0 auto;       text-align: center;    }    * {       padding: 2px;       margin:5px;    }    input[type="button"] {       ... Read More

HTML DOM Input Time max Property

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

135 Views

The HTML DOM Input Time max property returns/sets max attribute of Input Time.SyntaxFollowing is the syntax −Returning string valueinputTimeObject.maxSetting max to string valueinputTimeObject.max = hh:mm:ss.msString ValuesHere, “hh:mm:ss.ms” can be the following −stringValueDetailshhIt defines hour (eg:18)mmIt defines minutes (eg:59)ssIt defines seconds (eg:00)msIt defines milli-seconds (eg:700)ExampleLet us see an example of Input Time max property − Live Demo Input Time max    form {       width:70%;       margin: 0 auto;    text-align: center;    }    * {       padding: 2px;       margin:5px;    }    input[type="button"] {       border-radius: ... Read More

HTML DOM Input Time form Property

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

142 Views

The HTML DOM Input Time form property returns the reference of enclosing form for input Time.SyntaxFollowing is the syntax −Returning reference to the form objectinputTimeObject.formExampleLet us see an example of Input Time form property − Live Demo Input Time form    form {       width:70%;       margin: 0 auto;       text-align: center;    }    * {       padding: 2px;       margin:5px;    }    input[type="button"] {       border-radius: 10px;    } Time-form Examination Time :    var divDisplay = document.getElementById("divDisplay");    var inputTime = document.getElementById("TimeSelect");    function getform() {       divDisplay.textContent = inputTime.form.id+' exam starts from '+inputTime.value;    } OutputThis will produce the following output −Before clicking ‘Which Exam?’ button −After checking ‘Which Exam?’ button −

HTML DOM Input Time disabled Property

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

134 Views

The HTML DOM Input Time disabled property sets/returns whether Input Time is enabled or disabled.SyntaxFollowing is the syntax −Returning boolean value - true/falseinputTimeObject.disabledSetting disabled to booleanValueinputTimeObject.disabled = booleanValueBoolean ValuesHere, “booleanValue” can be the following −booleanValueDetailstrueIt defines that the input time is disabled.falseIt defines that the input time is not disabled and it is also the default value.ExampleLet us see an example of Input Time disabled property − Live Demo Input Time disabled    form {       width:70%;       margin: 0 auto;       text-align: center;    }    * {       ... Read More

How to know the browser language and browser platform in JavaScript?

Lokesh Yadav
Updated on 08-Dec-2022 07:48:23

704 Views

In this article we are going to discuss how to know the browser language and browser platform with the help of examples in JavaScript To know the various properties of the browser, the JavaScript provides Navigator object. The Navigator object has several properties, which include - connection, credentials, cookies, geolocation, language, platform, etc. We are concerned with Navigator.language and Navigator.platform to know the language and platform of the browser. Let us discuss about them in detail. Navigator.language The read-only Navigator.language property returns a string that represents the browser UI language. It returns a string that returns the language version. For ... Read More

HTML DOM Input Time defaultValue Property

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

362 Views

The HTML DOM Input Time defaultValue property sets/returns the default value corresponding to Time Input. The value attribute changes as the user changes the time but default value does not change.SyntaxFollowing is the syntax −Returning string valueinputTimeObject.defaultValueSetting defaultValue to stringinputTimeObject.defaultValue = ‘string’ExampleLet us see an example of Input Time defaultValue property − Live Demo Input Time defaultValue    form {       width:70%;       margin: 0 auto;       text-align: center;    }    * {       padding: 2px;       margin:5px;    }    input[type="button"] {       border-radius: ... Read More

HTML DOM Input Time autofocus Property

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

106 Views

The HTML DOM Input Time autofocus property sets/returns whether Input Time is focused upon initial page load.SyntaxFollowing is the syntax −Returning boolean value - true/falseinputTimeObject.autofocusSetting autofocus to booleanValueinputTimeObject.autofocus = booleanValueBoolean ValuesHere, “booleanValue” can be the following:booleanValueDetailstrueIt defines that input will be autofocused on initial page load.falseIt is the default value and input is not autofocused.ExampleLet us see an example of Input Time autofocus property − Live Demo Input Time autofocus    form {       width:70%;       margin: 0 auto;       text-align: center;    }    * {       padding: 2px; ... Read More

HTML DOM Input Text value Property

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

181 Views

The HTML DOM Input Text value property returns a string, which is the value of the value attribute of input Text. User can also set it to a new string.SyntaxFollowing is the syntax −Returning string valueinputTextObject.valueSetting value attribute to a string valueinputTextObject.value = ‘String’ExampleLet us see an example of Input Text value property − Live Demo Input Text value    form {       width:70%;       margin: 0 auto;       text-align: center;    }    * {       padding: 2px;       margin:5px;    }    input[type="button"] {     ... Read More

Advertisements