Easy Tutorial
❮ Prop Color Name Event Ondblclick ❯

HTML DOM Input Range Object


Input Range Object

The Input Range object is new in HTML5.

The Input Range object represents an HTML <input> element with the type="range" attribute.

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

Accessing an Input Range Object

You can access an <input> element with the type="range" attribute using the getElementById() function:

Tip: You can also access the Input Range object through the form's elements collection.

Creating an Input Range Object

You can create an <input> element with the type="range" attribute using the document.createElement() method:

Input Range Object Properties

Property Description
autocomplete Sets or returns the autocomplete attribute value of the slider control
autofocus Sets or returns whether the slider control should automatically get focus when the page loads
defaultValue Sets or returns the default value of the slider control
disabled Sets or returns whether the slider control is enabled or disabled
form Returns a reference to the form that contains the slider control
list Returns a reference to the datalist that contains the slider control
max Sets or returns the max attribute value of the slider control
min Sets or returns the min attribute value of the slider control
name Sets or returns the name attribute value of the slider control
step Sets or returns the step attribute value of the slider control
type Returns the form type of the slider control
value Sets or returns the value attribute value of the slider control

Standard Properties and Events

The Input Range object also supports standard properties and events.


Related Articles

HTML Tutorial: HTML Forms

HTML Reference: HTML <input> Tag

HTML Reference: HTML <input> type Attribute

❮ Prop Color Name Event Ondblclick ❯