|
热门文章 |
|
|
|
|
调用Windows自带的配色控件 |
来源:蓝色理想 更新时间:2010/8/13 20:54:16 阅读次数: 我要投稿 |
|
<OBJECT id=dlgHelper CLASSID="clsid:3050f819-98b5-11cf-bb82-00aa00bdce0b" width="0px" height="0px"></OBJECT> <script> var tempColor = "0099cc"; function returnColor(){ var Hcolor = dlgHelper.ChooseColorDlg(tempColor).toString(16); with(event.srcElement){ value = ((Hcolor.length<6)?"000000".substring(0,6-Hcolor.length):"") + Hcolor; style.backgroundColor = ((Hcolor.length<6)?"000000".substring(0,6-Hcolor.length):"") + Hcolor; } tempColor = Hcolor } </script> <input type="text" value="#0099CC" size="12" onclick="returnColor()" style="background-color: #0099CC"> |
|
上一篇文章: 用Javascript svg等技术实现了个自动配色器下一篇文章: 获取16进制颜色值的取色器 |
|
|