HTML Articles

Page 8 of 151

HTML DOM Input Time Object

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 219 Views

The HTML DOM Input Time Object represents an HTML element with type="time". This object allows users to select a time value and provides JavaScript access to manipulate time input fields programmatically. Syntax Following is the syntax to create an input element with type time − var timeObject = document.createElement("input"); timeObject.type = "time"; To access an existing time input element − var timeObject = document.getElementById("timeId"); Properties The Input Time object supports the following properties − Property Description autocomplete Sets or returns ...

Read More

HTML DOM Input Time readOnly Property

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 174 Views

The HTML DOM Input Time readOnly property sets or returns whether an Input Time field can be modified by the user. When set to true, the input becomes read-only and displays a grayed-out appearance, preventing user interaction while still allowing programmatic access. Syntax Following is the syntax for getting the readOnly property value − inputTimeObject.readOnly Following is the syntax for setting the readOnly property − inputTimeObject.readOnly = booleanValue Return Value The readOnly property returns a Boolean value − true − If the time input field is read-only ...

Read More

HTML DOM Input Time required Property

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 192 Views

The HTML DOM Input Time required property controls whether a time input field must be filled out before the form can be submitted. This property returns or sets a boolean value indicating if the time field is mandatory. Syntax Following is the syntax for returning the required property − inputTimeObject.required Following is the syntax for setting the required property − inputTimeObject.required = booleanValue Parameters The booleanValue parameter accepts the following values − Value Description true The time field is required and ...

Read More

HTML DOM Input Time step Property

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 251 Views

The HTML DOM Input Time step property sets or returns the legal number intervals for the seconds component of a time input field. This property controls the granularity of time selection, determining which second values are considered valid when users interact with the time picker. Syntax Following is the syntax for returning the step value − inputTimeObject.step Following is the syntax for setting the step value − inputTimeObject.step = number Parameters The step property accepts numeric values representing seconds − Parameter Description ...

Read More

HTML DOM Input Time stepDown( ) Method

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 140 Views

The HTML DOM Input Time stepDown() method decreases the value of a time input field by a specified number of minutes. This method is particularly useful for creating time adjustment interfaces or implementing custom time picker controls. Syntax Following is the syntax for the stepDown() method − inputTimeObject.stepDown(number) Parameters The method accepts one optional parameter − number − An integer representing the number of minutes to decrease from the time value. If not specified, the default value is 1. Return Value The stepDown() method does not return any ...

Read More

HTML DOM Input URL pattern Property

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 292 Views

The HTML DOM Input URL pattern property sets or returns the regular expression that validates URL input fields. The pattern attribute's value is checked against the text typed in the URL field to ensure it matches the specified format. Syntax Following is the syntax for returning the pattern value − inputURLObject.pattern Following is the syntax for setting the pattern value − inputURLObject.pattern = "RegExp" Parameters The pattern property accepts a single parameter − RegExp − A string containing a regular expression that the URL input value must ...

Read More

HTML DOM Input URL readOnly Property

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 168 Views

The HTML DOM Input URL readOnly property sets or returns whether a URL input field can be modified by the user. When set to true, the input becomes read-only and cannot be edited, though its value can still be accessed and copied programmatically. Syntax Following is the syntax for getting the readOnly property value − inputURLObject.readOnly Following is the syntax for setting the readOnly property − inputURLObject.readOnly = booleanValue Parameters The booleanValue parameter can be one of the following − Value Description ...

Read More

HTML DOM Input Week autofocus Property

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 165 Views

The Input Week autofocus property in the HTML DOM sets or returns whether an input field of type "week" should automatically receive focus when the page loads. This property corresponds to the HTML autofocus attribute and is useful for improving user experience by immediately directing attention to the week input field. Syntax Following is the syntax for getting the autofocus property − inputWeekObject.autofocus Following is the syntax for setting the autofocus property − inputWeekObject.autofocus = booleanValue Property Values The autofocus property accepts boolean values − ...

Read More

HTML DOM Input Week defaultValue Property

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 184 Views

The HTML DOM Input Week defaultValue property sets or returns the default value of a week input field. This property represents the original value attribute specified in the HTML, which remains constant even when the user changes the input field's current value. It is useful for resetting the field back to its original state. Syntax Following is the syntax for returning the default value − inputWeekObject.defaultValue Following is the syntax for setting the default value − inputWeekObject.defaultValue = "string" Parameters The defaultValue property accepts a string parameter representing a ...

Read More

HTML DOM Input Week Object

AmitDiwan
AmitDiwan
Updated on 16-Mar-2026 176 Views

The HTML DOM Input Week Object represents an HTML input element with type week. This object allows users to select a specific week and year, providing methods and properties for manipulating week-based form inputs programmatically. Syntax Following is the syntax to create an input element with type week using JavaScript − var weekObject = document.createElement("INPUT"); weekObject.type = "week"; You can also access an existing week input element − var weekObject = document.getElementById("weekId"); Properties The Input Week Object supports the following properties − Property Description ...

Read More
Showing 71–80 of 1,509 articles
« Prev 1 6 7 8 9 10 151 Next »
Advertisements