Input Color form Property

Definition and Usage

form The property returns a reference to the form containing the color selector.

This property returns the form object on success.

Note:This property is read-only.

See also:

HTML Reference Manual:HTML <form> Tag

Example

Get the id of the form containing the <input type="color"> element:

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

Try it yourself

Syntax

colorObject.form

Technical details

Return value: Reference to a form element containing a color selector. If the color selector 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

Note:The <input type="color"> element does not display any color selector in Internet Explorer and Safari.