<script>alert("Hello,all"); var ColorHex=new Array('00','33','66','99','CC','FF'); var SpColorHex=new Array('FF0000','00FF00','0000FF','FFFF00','00FFFF','FF00FF'); var current=null; function intocolor() { var colorTable=''; for (i=0;i<2;i++) { for (j=0;j<6;j++) { colorTable=colorTable+''; colorTable=colorTable+''; if (i==0){ colorTable=colorTable+'';} else{ colorTable=colorTable+'';} colorTable=colorTable+''; for (k=0;k<3;k++) { for (l=0;l<6;l++) { colorTable=colorTable+''; } } } } colorTable='
' +'
' +'
' +'
' +'
' +'
' +colorTable+'
'; colorpanel.innerHTML=colorTable; } function doOver() { if ((event.srcElement.tagName=="TD") && (current!=event.srcElement)) { if (current!=null){current.style.backgroundColor = current._background;} event.srcElement._background = event.srcElement.style.backgroundColor; document.all["DisColor"].style.backgroundColor = event.srcElement.style.backgroundColor; document.all["HexColor"].value = event.srcElement.style.backgroundColor; event.srcElement.style.backgroundColor = "white"; current = event.srcElement; } } function doOut() { if (current!=null) current.style.backgroundColor = current._background ;} function doclick(){ if (event.srcElement.tagName=="TD"){ alert("选取颜色: "+event.srcElement._background); return event.srcElement._background ;} } intocolor();</script>