Found 2416 Articles for HTML

HTML DOM Input Range type property

AmitDiwan
Updated on 22-Aug-2019 12:42:41

83 Views

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

HTML DOM Input Range stepUp() method

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

77 Views

The HTML DOM Input Range stepUp() method is used for incrementing the slider control value by a specified number. If left blank then it will increment by 1.If the step attribute is specified then the stepUp() method will increment in multiple of that. Eg: If step=”20” then stepUp(2) will increment by 20*2=40SyntaxFollowing is the syntax for Range stepUp() method −rangeObject.stepUp(number)Here, number is a mandatory parameter for specifying the the slider control increment value. If left blank it will increment by 1.ExampleLet us look at an example for the range stepUp() method − Live Demo Input range stepUp() method ... Read More

HTML DOM Input Range stepDown() method

AmitDiwan
Updated on 22-Aug-2019 12:34:50

60 Views

The HTML DOM Input Range stepDown() method is used for decrementing the slider control value by a specified number. If left blank then it will decrement by 1. If the step attribute is specified then the stepdown() method will decrement in multiple of that. Eg: If step=”20” then stepDown(2) will decrement by 20*2=40SyntaxFollowing is the syntax for Range stepDown() method −rangeObject.stepDown(number)Here, number is a mandatory parameter for specifying the slider control decrement value. If left blank it will decrement by 1.ExampleLet us look at an example for the range stepDown() method − Live Demo Input range stepDown() method ... Read More

HTML DOM Input Range step property

AmitDiwan
Updated on 22-Aug-2019 12:29:44

103 Views

The HTML DOM Input Range step property is used for setting or returning the slider control step attribute value. It specifies how much the slider will move on each movement. By using the max and min attribute with the step property, we can define a range of legal values.SyntaxFollowing is the syntax for −Setting the step property −rangeObject.step=numberHere, number specifies the slider control movement size. The default value for this is 1.ExampleLet us look at an example for the Input Range step property − Live Demo Input range step Property VOLUME Change the step property value ... Read More

HTML DOM Input Range object

AmitDiwan
Updated on 22-Aug-2019 12:26:22

132 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
Updated on 22-Aug-2019 12:20:33

62 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
Updated on 22-Aug-2019 12:14:48

80 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
Updated on 22-Aug-2019 12:11:34

122 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
Updated on 22-Aug-2019 12:05:07

64 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

Advertisements