element: var x = ..."> element: var x = ...">

YouTip LogoYouTip

Prop Range Form

HTML DOM Input Range form Property

HTML DOM Input Range form Property

Example

Return the id of the form that contains the <input type="range"> element:

var x = document.getElementById("myRange").form.id;

x output will be:

myForm

Try it yourself Β»


Definition and Usage

The form property returns a reference to the form that contains the range slider control.

On success, this property returns a form object.

Note: This property is read-only.


Browser Support

The form property is supported in all major browsers.

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


Syntax

rangeObject.form

Technical Details

Return Value: A reference to the form element containing the range slider. Returns null if the range slider is not in a form.

← Prop Range NameProp Range Disabled β†’