Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

HTML DOM Input Color form attribute

Input Color form attribute

Input Color Object Reference Input Color Object

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

Internet ExplorerFirefoxOperaGoogle ChromeSafari

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

tag


Input Color Object Reference Input Color Object