Input Color form attribute
Example
Return the form containing the element's form id:
var x = document.getElementById("myColor").form.id;
x
The output is:
myForm
Try it »
Definition and Usage
The form attribute returns a reference to the form that contains the color picker.
On success, returns the form object of this attribute.
Note: This attribute is read-only.
Browser support





All major browsers support the form attribute.
**Note:** Internet Explorer and Safari browsers do not support .
Syntax
colorObject
.form
Technical Details
| Return Value: | A reference to the form element containing the color picker. If the color picker is not inside a form, returns null. |
|---|
Related Articles
HTML Reference Manual: HTML
Input Color Object