Input Color formProperties

Input Color 对象参考手册Input Color Object

Examples

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

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

Try it »

Definition and Usage

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

On success, returns the form object of this property.

Note:This property is read-only.


Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the form property.

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. If the color picker is not in a form, returns null.


Related Articles

HTML Reference:HTML <form> tag


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