最简单的,在body区域加入: 复制代码 代码如下: 调用的JS: 复制代码 代码如下: <BR>var tempColor = "0099cc"; <BR>function picColor(){ <BR>var Hcolor = document.getElementById("dlgHelper").ChooseColorDlg(tempColor).toString(16); <BR>//with(event.srcElement){ <BR>//value = ((Hcolor.length<6)?"000000".substring(0,6-Hcolor.length):"") + Hcolor; <BR>//style.backgroundColor = ((Hcolor.length<6)?"000000".substring(0,6-Hcolor.length):"") + Hcolor; <BR>var newColor = ((Hcolor.length<6)?"000000".substring(0,6-Hcolor.length):"") + Hcolor; <BR>if(newColor.toString().substring(0,1) != "#"){ <BR>newColor = "#" + newColor; <BR>} <BR>alert(newColor); <BR>} <BR>// tempColor = Hcolor; <BR>// window.alert(tempColor); <BR>//} <br><br> 或者直接使用这个: 棰