Input Range typeProperty
Example
Returns the form element type of the slider control:
var x = document.getElementById("myRange").type;
xThe output result is:
range
Try it yourself »
Definition and Usage
The type property returns the form type of the slider control.
In the example above, Internet Explorer 9 and earlier IE versions will return "text" instead of "range". Internet Explorer 10 (and later), Firefox, Opera, Chrome, and Safari browsers will return "range".
Browser Support
![]()
![]()
![]()
![]()
![]()
All major browsers support the type property.
Note:Internet Explorer 9 and earlier IE versions do not support HTML <input> elements with the type="range" attribute.
Syntax
rangeObject.type
Technical Details
| Return value: | A string representing the form element type of the slider control |
|---|
Input Range Object Other Extensions