Javascript examples for DOM HTML Element:Input Color
Create HTML5 input type color element and set value
<html> <head></head> <body> <script> var i = 0; var inp=document.createElement("input"); inp.setAttribute('type','color'); inp.setAttribute('id','colo_'+i); inp.value = '#ffffff'; inp.setAttribute('class','datafield'); document.body.appendChild(inp); </script> </body>//from w w w .j a va 2 s .c o m </html>