Input Range formProperty

Input Range 对象参考手册Input Range Object

Example

Return the id of the form to which the <input type="range"> element belongs:

var x = document.getElementById("myRange").form.id;
xThe output result is:
myForm

Try it Yourself »

Definition and Usage

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

If successful, this property returns a form object.

Note:This property is read-only.


Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the form property.

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


Syntax

rangeObject.form

Technical Details

Return Value: A reference to the form element that contains the slider control. If the slider control is not in a form, returns null.


Input Range 对象参考手册Input Range Object Other Extensions