THE WORLD'S LARGEST WEB DEVELOPER SITE

Input Color type Property

❮ Input Color Object

Example

Find out which type of form element the color picker is:

var x = document.getElementById("myColor").type;
Try it Yourself »

Definition and Usage

The type property returns which type of form element the color picker is.

For a color picker this property will always return "color".


Browser Support

Property
type Yes 10.0 Yes Yes Yes

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


Syntax

colorObject.type

Technical Details

Return Value: A String, representing the type of form element the color picker is

❮ Input Color Object