Dom Obj Color
# HTML DOM Input Color Object
* * *
## Input Color Object
The Input Color object is new in HTML5.
The Input Color object represents an HTML `` element with the `type="color"` attribute.
**Note:** Internet Explorer or Safari browsers do not support the `` element with the `type="color"` attribute.
### Accessing an Input Color Object
You can use the `getElementById()` function to access an `` element with the `type="color"` attribute:
```javascript
var x = document.getElementById("myColor");
(#)
**Tip:** You can also access the Input Color object via the form's (#) collection.
### Creating an Input Color Object
You can use the `document.createElement()` method to create an `` element with the `type="color"` attribute:
```javascript
var x = document.createElement("INPUT");
x.setAttribute("type", "color");
(#)
## Input Color Object Properties
| Property | Description |
| --- | --- |
| autocomplete | Sets or returns the autocomplete attribute value of the color picker. |
| (#) | Sets or returns whether the color picker should get focus when the page loads. |
| defaultValue | Sets or returns the default value of the color picker. |
| (#) | Sets or returns whether the color picker is disabled. |
| (#) | Returns a reference to the form that contains the color picker. |
| list | Returns a reference to the datalist that contains the color picker. |
| (#) | Sets or returns the name attribute value of the color picker. |
| (#) | Returns the form element type of the color picker. |
| (#) | Sets or returns the value attribute value of the color picker. |
## Standard Properties and Events
The Input Color object also supports standard (#) and (#).
* * *
## Related Articles
HTML Tutorial: (#)
HTML Reference: [HTML `` Tag](#)
HTML Reference: [HTML `` type Attribute](#)
[](#)(#)
(#)[](http://www.runoo
YouTip