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 16 of 151
HTML DOM Input Radio autofocus property
The HTML DOM Input Radio autofocus property is associated with the HTML element's autofocus attribute. This property sets or returns whether a radio button should automatically receive focus when the page loads. Syntax Following is the syntax for setting the autofocus property − radioObject.autofocus = true|false Following is the syntax for getting the autofocus property − var focusState = radioObject.autofocus; Parameters The autofocus property accepts boolean values − true − The radio button will automatically get focus when the page loads. false − The radio button ...
Read MoreHTML DOM Input Radio defaultChecked Property
The HTML DOM Input Radio defaultChecked property determines whether a radio button was checked by default when the page first loaded. It returns true if the radio button has the checked attribute in the HTML markup, otherwise it returns false. This property reflects the initial state, not the current checked state. Syntax Following is the syntax for the Radio defaultChecked property − radioObject.defaultChecked Return Value The defaultChecked property returns a Boolean value − true − If the radio button has the checked attribute in HTML false − If the radio button ...
Read MoreHTML DOM Input Radio name Property
The HTML DOM Input Radio name property is used for setting or returning the name attribute of a radio button input field. The name attribute is crucial for identifying form data after submission to the server and for grouping radio buttons together so only one can be selected at a time. Syntax Following is the syntax for setting the name property − radioObject.name = "name" Following is the syntax for getting the name property − var name = radioObject.name Parameters The name parameter is a string that specifies the ...
Read MoreHTML DOM Input Radio object
The HTML DOM Input Radio object represents an element with type="radio". Radio buttons allow users to select one option from a group of related choices. The Input Radio object provides properties and methods to dynamically create, access, and manipulate radio button elements using JavaScript. Syntax Following is the syntax for creating an input radio object − var radioElement = document.createElement("INPUT"); radioElement.setAttribute("type", "radio"); Following is the syntax for accessing an existing input radio object − var radioElement = document.getElementById("radioId"); Properties Following are the key properties of the Input Radio ...
Read MoreHTML DOM Input Radio required property
The HTML DOM Input Radio required property is associated with the required attribute of an element. The required property is used for setting and returning whether it is necessary to check a radio button before the form is submitted to the server. This allows the form to not submit if a radio button with the required attribute is left unchecked by the user. Syntax Following is the syntax for setting the required property − radioObject.required = true|false Following is the syntax for getting the required property − var isRequired = radioObject.required; ...
Read MoreHTML DOM Input Password pattern property
The HTML DOM Input Password pattern property is used for setting or returning the pattern attribute of an input password field. It validates the password against a regular expression specified by the pattern property to ensure the input meets specific format requirements. Syntax Following is the syntax for setting the pattern property − passwordObject.pattern = regexp Following is the syntax for returning the pattern property − passwordObject.pattern Parameters regexp − A string containing a regular expression that the password input value must match. If the input doesn't match the ...
Read MoreHTML DOM Input Password placeholder property
The HTML DOM Input Password placeholder property is used for setting or returning the placeholder attribute value of a password input field. The placeholder provides a hint to users about what kind of input is expected, displaying greyed-out text inside the field before any user input. Unlike the value property, placeholder text is not submitted with the form data. Syntax Following is the syntax for setting the placeholder property − passwordObject.placeholder = text Following is the syntax for getting the placeholder property − var placeholderText = passwordObject.placeholder Parameters text ...
Read MoreHTML DOM Input Password required property
The HTML DOM Input Password required property is associated with the required attribute of an element with type="password". This property sets or returns whether a password field must be filled before form submission. When set to true, the browser prevents form submission if the password field is empty and displays a validation message. Syntax Following is the syntax for setting the required property − passwordObject.required = true|false Following is the syntax for getting the required property − var isRequired = passwordObject.required; Parameters The required property accepts the following ...
Read MoreHTML DOM Input Radio value Property
The HTML DOM Input Radio value property is used to set or return the value of the value attribute for a radio button element. This property allows you to access or modify the value that will be sent to the server when the form is submitted. The value property doesn't affect the visual appearance of the radio button on the webpage. Instead, it serves as an identifier to distinguish between different radio buttons in the same group when form data is processed. Syntax Following is the syntax to return the value property − radioObject.value ...
Read MoreHTML DOM Input Range max property
The HTML DOM Input Range max property is used for setting or returning the max attribute value for the range slider control. This attribute indicates the maximum value of the slider control and is often used with the min property to create a range of values between which the slider can move. Syntax Following is the syntax for setting the Range max property − rangeObject.max = number Following is the syntax for returning the Range max property − var maxValue = rangeObject.max Here, number represents the maximum slider control value, ...
Read More