Found 2202 Articles for HTML

HTML DOM Input Range form property

AmitDiwan
Updated on 22-Aug-2019 12:05:07

131 Views

The HTML DOM Input Range form property is used for returning the form reference that contains the given input range slider. If the range slider is outside the form then it will simply return NULL. This property is read-only.SyntaxFollowing is the syntax for input range form property.rangeObject.formExampleLet us look at an example for the Input range form property − Live Demo Input range form Property Get the form id which contains the above range slider clicking on the below button GET FORM    function formId() {       var P=document.getElementById("RANGE1").form.id;       ... Read More

HTML DOM Input Range disabled property

AmitDiwan
Updated on 22-Nov-2023 04:49:27

1K+ Views

The HTML DOM Input range disabled property is used for setting or returning if the range slider should be disabled or not. It uses boolean values with true representing the range slider should be disabled and false otherwise. The disabled property is set to false by default. However, the disabled element is greyed out by default and unclickable. Syntax Following is the syntax for − Setting the disabled property − rangeObject.disabled = true|false; Here, true=range slider is disabled and false the range slider is not disabled. It is false by default. Example Let us look at an example for the ... Read More

HTML DOM Input Range autofocus property

AmitDiwan
Updated on 22-Aug-2019 11:54:00

151 Views

The HTML DOM input range autofocus property is associated with the HTML element’s autofocus attribute. This property is used for setting or returning if the input range slider should be automatically focused when the page loads or not.SyntaxFollowing is the syntax for −Setting the autofocus property −rangeObject.autofocus = true|falseHere, true represents the range slider should get focus and the false represents otherwise. It is set to false by default.ExampleLet us look at an example for the Input range autofocus property − Live Demo Input range autofocus property CHECK    function rangeFocus() { ... Read More

HTML DOM Input Radio value Property

AmitDiwan
Updated on 22-Aug-2019 11:48:05

194 Views

The HTML DOM Input radio value property is associated with the input element having type=”radio” and the value attribute. It is used to return the value of radio button value attribute or to set it.The value property for radio button doesn’t affect the user interface of the website as the content is simply not displayed. However it can be used to distinguish between several buttons of the same group when the form is submitted.SyntaxFollowing is the syntax for −Set the value property −radioObject.value = text;Here, text is used for specifying the value for the radio button.ExampleLet us look at an ... Read More

HTML DOM Input Radio type property

AmitDiwan
Updated on 22-Aug-2019 11:43:33

191 Views

The HTML DOM Input radio type property is associated with the input element having its type=”radio”. It will always return radio for the input radio element.SyntaxFollowing is the syntax for radio type property −radioObject.typeExampleLet us look at an example for the radio type property − Live Demo Input radio type Property FRUIT: Mango Get the above input element type by clicking the below button GET Type    function radioType() {       var P=document.getElementById("Mango").type;       document.getElementById("Sample").innerHTML = "The type for the input field is: "+P ;    } OutputThis ... Read More

HTML DOM Input Password type property

AmitDiwan
Updated on 22-Aug-2019 10:39:46

150 Views

The HTML DOM Input password type property is associated with the input element having its type=”password”. It will always return password for the input password element.SyntaxFollowing is the syntax for password type property −passwordObject.typeExampleLet us look at an example for the Input password type property − Live Demo password type property PASSWORD: Get the above element type by clicking the below button Get Type    function getType() {       var t = document.getElementById("PASS1").type;       document.getElementById("Sample").innerHTML = "The type for the input field is : "+t;    } OutputThis will produce ... Read More

HTML DOM Input Password size property

AmitDiwan
Updated on 22-Aug-2019 09:12:03

173 Views

The HTML DOM Input Password size property is used for setting or returning the input password size attribute value. It is used for defining the password field width in terms of characters. The default width is of 20 characters.SyntaxFollowing is the syntax for −Setting the password size property −passwordObject.size = numberHere, number represents the password field width in characters. The default width is 20 characters.ExampleLet us look at an example for the Input password size property − Input password size property Password: Change the Password field width by clicking the below button CHANGE    function ... Read More

HTML DOM Input Password required property

AmitDiwan
Updated on 22-Aug-2019 09:04:18

166 Views

The HTML DOM input password required property is associated with the required attribute of an element. The required property is used for setting and returning if it is necessary to fill some password field or not before the form is submitted to the server. This allows the form to not submit if a password field with required attribute is left empty by the user.SyntaxFollowing is the syntax for −Setting the required property −textObject.required = true|falseHere, true represents the text field must be filled while false represents its optional to fill the field before submitting the form.ExampleLet us look at ... Read More

HTML DOM Input Password readOnly property

AmitDiwan
Updated on 22-Aug-2019 08:52:39

154 Views

The HTML DOM Input Password readOnly property is used for setting or returning whether the input password field is read-only or not. The readOnly property makes the element non-editable but it can still be focused by tab or by clicking. If there is a default value inside a read-only element then it is sent to server on submit.SyntaxFollowing is the syntax for −Set the readOnly property −passwordObject.readOnly = true|falseHere, true represents the password field is read only while false represents otherwise. The readOnly property is set to false by default.ExampleLet us look at an example for the password readOnly property ... Read More

HTML DOM Input Password placeholder property

AmitDiwan
Updated on 22-Aug-2019 08:37:42

399 Views

The HTML DOM Input Password placeholder property is used for setting or returning the placeholder attribute value of an input password field. The placeholder property is used for giving the web page users a hint about the input element by showing a text inside the input field befor the user inputs anything. The placeholder text is greyed by default and isn’t submitted to the form unlike the value property.SyntaxFollowing is the syntax for −Setting the placeholder property −passwordObject.placeholder = textHere, text represents the placeholder text specifying the hint for the user about the password field.ExampleLet us look at an example ... Read More

Advertisements