파일 이름 : colorpicker.html 요구 사항 : Internet Explorer 또는 Mozilla 작성자 : Jean-Luc Antoine 제출 날짜 : 26/03/2005 카테고리 : 4K 复代码 代码如下: Couleur:Cliquez pour lister lesoeuvres les plus prochesde la couleur 선택 항목 <br><!--<BR>var total=1657;var X=Y=j=RG=B=0;<BR>var aR=new Array(전체);var aG=new Array(전체); var aB=새 배열(전체);<BR>for (var i=0;i<256;i ){<BR>aR[i 510]=aR[i 765]=aG[i 1020]=aG[i 5*255]=aB[i]=aB[i 255]=0;<BR>aR[510-i]=aR[i 1020]=aG[i]=aG[1020-i]=aB[i 510 ]=aB[1530-i]=i;<BR>aR[i]=aR[1530-i]=aG[i 255]=aG[i 510]=aB[i 765]=aB[i 1020]= 255;<BR>if(i<255){aR[i/2 1530]=127;aG[i/2 1530]=127;aB[i/2 1530]=127;}<BR>}<BR> 함수 p(){var jla=document.getElementById('choix');jla.innerHTML=artabus;jla.style.BackgroundColor=artabus;document.forms['recherche'].rgb.value=artabus}<BR>var hexbase=새 배열("0","1","2","3","4","5","6","7","8","9","A"," B","C","D","E","F");<BR>var i=0;var jl=new Array();<BR>for(x=0;x<16;x )for(y=0;y<16;y )jl[i ]=hexbase[x] hexbase[y];<BR>document.write('<' 'table border="0"cellspacing="0" cellpadding="0" onMouseover="t(event)" onClick="p()">');<br>var H=W=63;<br>for (Y=0;Y<=H;Y ){<BR> s='<' 'tr height=2>';j=Math.round(Y*(510/(H 1))-255)<br> for (X=0;X<=W;X ){<BR> i=Math .round(X*(총/W))<BR> R=aR[i]-j;if(R<0)R=0;if(R>255||isNaN(R))R=255<BR> G=aG[i]-j;if(G<0)G=0;if(G>255||isNaN(G))G=255<br> B=aB[i]-j;if(B< ;0)B=0;if(B>255||isNaN(B))B=255<br> s=s '<' 'td 너비=2 bgcolor=#' jl[R] jl[G] jl[B] '><' '/td>'<br> }<br> document.write(s '<' '/tr>')<br>}<br>document.write('<' '/table>');<br>var ns6=document.getElementById&&!document.all<br>var ie=document.all<br>var artabus=''<br>function t(e){<br>source=ie?event.srcElement:e .target<br>if(source.tagName=="TABLE")return<br>while(source.tagName!="TD" && source.tagName!="HTML")source=ns6?source.parentNode:source. parentElement<br>document.getElementById('temoin').style.BackgroundColor=artabus=source.bgColor<br>}<br>// --><br> <입력 유형=제출> 来源:http://www.interclasse.com/scripts/colorpicker.php