THE WORLD'S LARGEST WEB DEVELOPER SITE
HTMLCSSJAVASCRIPTSQLPHPBOOTSTRAPJQUERYANGULARXML
 

Input Color type Property

Input Color Object Reference Input Color Object

Example

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

var x = document.getElementById("myColor").type;

The result of x will be:

color
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

Internet Explorer Firefox Opera Google Chrome Safari

The type property is supported in all major browsers.

Note: The <input type="color"> element is not supported 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 Reference Input Color Object