<script type="text/javascript">
var tempColor = "0099cc";
function picColor(){
var Hcolor = document.getElementById("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;
var newColor = ((Hcolor.length<6)?"000000".substring(0,6-Hcolor.length):"") + Hcolor;
if(newColor.toString().substring(0,1) != "#"){
newColor = "#" + newColor;
}
alert(newColor);
}
// tempColor = Hcolor;
// window.alert(tempColor);
//}
</script>
js颜色选择器代码[firefox不支持]
内容版权声明:除非注明,否则皆为本站原创文章。