复主代码 代码如下: <머리> 颜color选择器 <br>본문{ <br> text-align:center; <br>} <br> <본문> <br><!-- <BR>var ColorHex=new Array('00','33','66','99','CC','FF') <BR>var SpColorHex=new Array( 'FF0000','00FF00','0000FF','FFFF00','00FFFF','FF00FF') <BR>var current=null <BR>function initcolor(evt) <BR>{ <BR>var colorTable=' ' <BR>for (i=0;i<2;i ) <BR>{ <BR>for (j=0;j<6;j ) <BR>{ <BR>colorTable=colorTable '<tr 높이 =15>' <br>colorTable=colorTable '<td width=15 style="배경색:#000000">' <br>if (i==0){ <br>colorTable=colorTable '<td width=15 style="cursor:pointer; background-color:#' ColorHex[j] ColorHex[j] ColorHex[j] ' " onclick="doclick(this.style.groundColor)">'} <br>else{ <br>colorTable=colorTable '<td width=15 style="cursor:pointer;Background-color:#' SpColorHex[ j] '" onclick="doclick(this.style.groundColor)">'} <br>colorTable=colorTable '<td width=15 style="Background-color:#000000">' <br>for (k=0;k{ <br>for (l=0;l{ <br>colorTable=colorTable '<td width= 15 style="cursor:pointer; background-color:#' ColorHex[k i*3] ColorHex[l] ColorHex[j] '" onclick="doclick(this.style.BackgroundColor)">' <br>} <br>} <br>} <br>} <br>colorTable='<table border="0"cellspacing="0" cellpadding="0" style="border:1px #000000 solid; 테두리 하단:없음;테두리 축소: 축소;너비:337px;" bordercolor="000000">' <br> '<tr height=20><td colspan=21 bgcolor=#ffffff style="font:12px tahoma;padding-left:2px;">' <br> '<span style="float:left;color:#999999;">搜索吧|为站长提供专业知识搜索</span>' <br> '<span style="float:right;padding-right:3px;cursor:pointer;" onclick="colorclose()">×关闭</span>' <br> '</td></테이블>' <br> '<table border="1"cellspacing="0" cellpadding="0" style="border-collapse:collapse" bordercolor="000000" style="cursor:pointer;">' <br> colorTable '</table>'; <br>document.getElementById("colorpane").innerHTML=colorTable; <br>var current_x = document.getElementById("inputcolor").offsetLeft; <br>var current_y = document.getElementById("inputcolor").offsetTop; <br>//alert(current_x "-" current_y) <br>document.getElementById("colorpane").style.left = current_x "px"; <br>document.getElementById("colorpane").style.top = current_y "px"; <br>} <br>function doclick(obj){ <br> alert(obj); <br>} <br>function colorclose(){ <br> document.getElementById("colorpane").style.display = "none"; <br> //alert("확인"); <br>} <br>function coloropen(){ <br> document.getElementById("colorpane").style.display = ""; <br>} <br>window.onload = initcolor; <br>