Latest web development tutorials

HTML DOM Input Range type property

Input Range Object Reference Input Range Object

Examples

Returns slider control form element type:

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

x The output is:

range

try it"

Definition and Usage

type property returns the type of form type slider control.

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


Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the type attribute.

Note: Internet Explorer 9 and earlier versions of IE do not support the use of type = HTML <input> element "range" attribute.


grammar

rangeObject .type

technical details

return value: String representing the form element type slider control


Input Range Object Reference Input Range Object