Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
-
Economics & Finance
HTML Articles
Page 106 of 151
HTML DOM Input Color form Property
The Input Color form property in HTML DOM returns a reference to the form element that contains the color input. This read-only property is useful for accessing the parent form of a color input element programmatically. Syntax Following is the syntax for accessing the form property − inputColorObject.form Return Value The form property returns a reference to the HTMLFormElement object that contains the color input. If the input is not inside a form, it returns null. Example − Getting Form Reference Following example demonstrates how to get the form reference of ...
Read MoreHTML DOM Input Color name Property
The HTML DOM Input Color name property gets or sets the value of the name attribute for an input color element. The name attribute is crucial for form submission, as it identifies the color input field when the form data is sent to the server. Syntax Following is the syntax for getting the name property − inputColorObject.name Following is the syntax for setting the name property − inputColorObject.name = "string" Return Value The name property returns a string representing the value of the name attribute of the input color ...
Read MoreHTML DOM Input Color type Property
The HTML DOM Input Color type property returns or sets the value of the type attribute of a color input element. This property allows you to get the current input type or dynamically change it to a different input type such as text, radio, or other valid input types. Syntax Following is the syntax for returning the type value − inputColorObject.type Following is the syntax for setting the type value − inputColorObject.type = stringValue Return Value The property returns a string representing the current type of the input element ...
Read MoreHTML DOM Input Date autofocus Property
The HTML DOM Input Date autofocus property sets or returns whether a date input field should automatically receive focus when the page loads. This property corresponds to the autofocus HTML attribute. Syntax Following is the syntax for getting the autofocus property − inputDateObject.autofocus Following is the syntax for setting the autofocus property − inputDateObject.autofocus = booleanValue Return Value The autofocus property returns a boolean value − true − If the date input has the autofocus attribute set false − If the date input does not have the ...
Read MoreHTML DOM Input Date name Property
The HTML DOM Input Date name property gets or sets the value of the name attribute for an HTML element. This property is essential for identifying form data when submitted to a server, as the name serves as the key in name-value pairs. Syntax Following is the syntax to get the name attribute value − inputDateObject.name Following is the syntax to set the name attribute value − inputDateObject.name = "newName" Parameters newName − A string value representing the new name for the input date element. ...
Read MoreHTML DOM Input Date max Property
The HTML DOM Input Date max property is used to set or return the value of the max attribute of an input element with type="date". This property defines the maximum date that users can select in a date picker, helping to create date range restrictions in forms. Syntax Following is the syntax for returning the max value − inputDateObject.max Following is the syntax for setting the max value − inputDateObject.max = "YYYY-MM-DD" Parameters The max property accepts a string value in the format YYYY-MM-DD representing the maximum selectable date. ...
Read MoreHTML DOM Input Date min Property
The HTML DOM Input Date min property is used to get or set the minimum allowable date for an HTML input element of type "date". This property corresponds to the min attribute in the HTML and restricts users from selecting dates earlier than the specified minimum date. Syntax Following is the syntax for getting the min property − inputDateObject.min Following is the syntax for setting the min property − inputDateObject.min = "YYYY-MM-DD" Parameters The min property accepts a string value in the format YYYY-MM-DD, where each component represents − ...
Read MoreHTML DOM Input Date required Property
The HTML DOM Input Date required property determines whether a date input field must be filled before the form can be submitted. This property returns a boolean value indicating the required state and can also be used to set the required attribute dynamically. Syntax Following is the syntax for getting the required property value − inputDateObject.required Following is the syntax for setting the required property − inputDateObject.required = booleanValue Parameters The booleanValue parameter can be one of the following values − Value Description ...
Read MoreHTML DOM Select form Property
The HTML DOM select form property returns a reference to the form element that contains the dropdown list. This read-only property is useful for identifying which form a select element belongs to, especially in documents with multiple forms. Syntax Following is the syntax for the select form property − selectElement.form Return Value The property returns a reference to the form element that contains the select element. If the select element is not within a form, it returns null. Example − Basic Form Reference Following example demonstrates how to get the form ...
Read MoreHTML DOM Select add() Method
The HTML DOM select add() method is used to add a new option element to an HTML dropdown list. This method dynamically inserts options into existing select lists, making it useful for creating interactive forms where options are added based on user actions or other conditions. Syntax Following is the syntax for the select add() method − selectObject.add(option, index) Parameters The add() method accepts the following parameters − option − An HTMLOptionElement object or HTMLOptGroupElement object to be added to the select list. index (optional) − An integer specifying the ...
Read More