YouTip LogoYouTip

Dom Obj Range

# HTML DOM Input Range Object * * * ## Input Range Object The Input Range object is new in HTML5. The Input Range object represents an HTML `` element with `type="range"`. **Note:** Internet Explorer 9 and earlier versions do not support the HTML `` element with `type="range"`. ### Accessing the Input Range Object You can use the `getElementById()` function to access the `` element with `type="range"`: ```javascript var x = document.getElementById("myRange"); (#) **Tip:** You can also access the Input Range object through the form's (#) collection. ### Creating an Input Range Object You can use the `document.createElement()` method to create an `` element with `type="range"`: ```javascript var x = document.createElement("INPUT"); x.setAttribute("type", "range"); (#) ## Input Range Object Properties | Property | Description | | --- | --- | | autocomplete | Sets or returns the autocomplete attribute value of the slider control | | (#) | 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 | | (#) | Sets or returns whether the slider control is disabled or not | | (#) | 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 | | (#) | Sets or returns the name attribute value of the slider control | | step | Sets or returns the step attribute value of the slider control | | (#) | Returns the form type of the slider control | | (#) | Sets or returns the value attribute value of the slider control | ## Standard Properties and Events The Input Range object also supports standard (#) and (#). * * * ## Related Articles HTML Tutorial: (#) HTML Reference: [HTML `` Tag](#) HTML Reference: [HTML `` type Attribute](#) [](#)(#) (#)
← Prop Range AutofocusProp Number Value β†’