Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

HTML DOM Input Range type Property

Input Range type Property

Input Range Object Reference Input Range Object

Example

Return the form element type of the slider control:

var x = document.getElementById("myRange").type;

x The output result is:

range

Try it »


Definition and Usage

The type property returns the form element type of the slider control.

In the example above, Internet Explorer 9 and earlier versions of IE return "text" instead of "range". Internet Explorer 10 (and later versions), Firefox, Opera, Chrome, and Safari return "range".


Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the type attribute.

Note: Internet Explorer 9 and earlier versions do not support the HTML using 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 Reference Input Range Object