Found 2417 Articles for HTML

HTML DOM Input Time Object

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

108 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

48 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

91 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

72 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

81 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

76 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

HTML DOM Input Time defaultValue Property

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

256 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

56 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

100 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

HTML DOM Input Text type Property

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

102 Views

The HTML DOM Input Text type property returns/sets type of Input Text.SyntaxFollowing is the syntax −Returning string valueinputTextObject.typeSetting type to string valueinputTextObject.type = stringValueString ValuesHere, “stringValue” can be the following −stringValueDetailsemailIt defines that input type is emailtextIt defines that input type is textradioIt defines that input type is radiotelIt defines that input type is tel and a number keypad is shown for inputExampleLet us see an example of Input Text type property − Live Demo Input Text type    form {       width:70%;       margin: 0 auto;       text-align: center;    } ... Read More

Advertisements