Input Range form Attribute

Definition and Usage

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

This property returns the form object on success.

Note:This property is read-only.

Example

Returns the id of the form containing the <input type="range"> element:

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

Try It Yourself

Syntax

rangeObject.form

Technical Details

Return Value:

Reference to the form element containing the slider control.

If the slider control is not in the form, it returns null.

Browser Support

The numbers in the table indicate the first browser version that fully supports this property.

Chrome Edge Firefox Safari Opera
Chrome Edge Firefox Safari Opera
Support 10.0 Support Support Support