YouTip LogoYouTip

Prop Color Form

HTML DOM Input Color form Property

HTML DOM Input Color form Property

-- Learning is not just about technology, but also about dreams!

JavaScript Reference

Overview

JavaScript Objects

Browser Objects

DOM Objects

HTML Objects

HTML DOM Checkbox Object

<input> - date

Input Color form Property

Input Color Object Reference Input Color Object

Example

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

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

x output result:

myForm

Try it yourself Β»


Definition and Usage

The form property returns a reference to the form that contains the color picker.

On success, it returns the form object of the property.

Note: This property is read-only.


Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

The form property is supported in all major browsers.

Note: Internet Explorer and Safari do not support the <input type="color"> element.


Syntax

colorObject.form


Technical Details

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

Related Articles

HTML Reference: HTML <form> Tag


Input Color Object Reference Input Color Object

← Prop Color NameProp Color Disabled β†’