Front End Technology Articles

Page 622 of 652

HTML DOM Input Range object

AmitDiwan
AmitDiwan
Updated on 22-Aug-2019 256 Views

The HTML DOM Input Range object is associated with the element with type “range”. We can create and access an input element with type range using the createElement() and getElementById() method respectively.PropertiesFollowing are the properties for the Input range object −Sr.NoProperty & Description1autocompleteTo set or return the autocomplete attribute value of a range control.2autofocusTo set or return if the range slider control should get focus automatically when the page loads or not3defaultValueTo set or return the range slider control default value.4disabledTo set or return if the slider control has been disabled, or not.5formTo return the reference of the form ...

Read More

HTML DOM Input Range name property

AmitDiwan
AmitDiwan
Updated on 22-Aug-2019 162 Views

The HTML DOM Input range name property is used for setting or returning the name attribute of an input range field. The name attribute helps in identifying the form data after it has been submitted to the server. JavaScript can also use the name attribute to refer form elements for manipulating later on.SyntaxFollowing is the syntax for −Setting the name property −rangeObject.name = nameExampleHere, name is for specifying the range slider control name.Let us look at an example for the range name property − Live Demo Input range name Property VOLUME Change the name of the ...

Read More

HTML DOM Input Range min property

AmitDiwan
AmitDiwan
Updated on 22-Aug-2019 190 Views

The HTML DOM Input Range min property is used for setting or returning the min attribute value for the range slider control. This attribute is used for indicating the minimum value of the slider control and is often used with min property to create a range of values between which the slider can move.SyntaxFollowing is the syntax for −Setting the Range min property −rangeObject.min = numberHere, number represents minimum slider control value.ExampleLet us look at an example for the Input range min property − Live Demo Range min property VOLUME Get the minimum value for the above ...

Read More

HTML DOM Input Range max property

AmitDiwan
AmitDiwan
Updated on 22-Aug-2019 233 Views

The HTML DOM Input Range max property is used for setting or returning the max attribute value for the range slider control. This attribute is used for indicating the maximum value of the slider control and is often used with min property to create a range of values between which the slider can move.SyntaxFollowing is the syntax for −Setting the Range max property −rangeObject.max = numberHere, number represents maximum slider control value.ExampleLet us look at an example for the Input range max property − Live Demo Range max property VOLUME Get the maximum value for the above ...

Read More

HTML DOM Input Range form property

AmitDiwan
AmitDiwan
Updated on 22-Aug-2019 167 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 Radio value Property

AmitDiwan
AmitDiwan
Updated on 22-Aug-2019 245 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
AmitDiwan
Updated on 22-Aug-2019 218 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
AmitDiwan
Updated on 22-Aug-2019 184 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
AmitDiwan
Updated on 22-Aug-2019 213 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
AmitDiwan
Updated on 22-Aug-2019 205 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
Showing 6211–6220 of 6,517 articles
« Prev 1 620 621 622 623 624 652 Next »
Advertisements