The effect is as shown in the figure:
Here's the code to get the color selector from the system:
<textarea id="runcode12479"><script> function $ (obj) {return document.getElementById (obj); function Pickcolor () {if (!window.isie) return; var Scolor = $ (' Dlghelper '). Choosecolordlg (); var color = scolor.tostring (16); while (color.length<6) color= "0" +color; Window.color = color; color = "#" +color; $ (' Div_color '). Style.backgroundcolor = color; $ (' Div_color '). Value = color; } var Isie = (document.all && window. ActiveXObject)? True:false; </script> <object id= "Dlghelper" classid= "clsid:3050f819-98b5-11cf-bb82-00aa00bdce0b" width= "0px" HEIGHT= " 0px "></OBJECT> <input class=" Inputtext "id= ' div_color ' value= ' #000000"/> <input type= "button" value = ' Get color ' onclick= ' Pickcolor () ></textarea>
[Ctrl + A All SELECT Note: If the need to introduce external JS need to refresh to perform]
The advantage is: The code is relatively small
The disadvantage is: only IE under use.