한국어
<!-- http://www.downcodes.com --> <!-- bbs http://www.downcodes.com/bbs--> <!--把如下代码加入<body>区域中-- > <script 언어="JavaScript"> <!-- 숨기기 var red=0; var 녹색=0; var 파란색=0; var 값=0; var 변환 = 새 배열() var hexbase= 새 배열("0", "1", "2", "3", "4", "5", "6", "7", "8", " 9", "A", "B", "C", "D", "E", "F"); for (x=0; x<16; x++){ for (y=0; y<16; y++){ 변환[값]= hexbase[x] + hexbase[y]; 값++; } } 함수 클리어(){ document.color.bl.value= 파란색; document.color.rd.value= 빨간색; document.color.gr.value= 녹색; } 함수 표시(){ redx = 변환[빨간색] greenx = 변환[녹색] bluex = 변환[파란색] var rgb = "#"+redx+greenx+bluex; document.color.rgbdspl.value= rgb; document.bgColor =rgb; } 함수 upred(x){ if ((red+x)<=255) red+=x document.color.rd.value= red; display() } 함수 downred(x){ if ((red-x)>=0) red-=x document.color.rd.value= red; display() } 함수 upgreen(x){ if ((green+x)<=255) green+=x document.color.gr.value= green; display() } 함수 downgreen(x){ if ((green-x)>=0) green-=x document.color.gr.value= green; display() } function upblue(x){ if ((blue+x)<=255) blue+=x document.color.bl.value= blue; display() } 함수 downblue(x){ if ((blue-x)>=0) blue-=x document.color.bl.value= blue; display() } // 숨기기 완료 --> </script> <form name="color"> <table> <tr align="Center"> <td> <input name="red" type="button" value =" +50 " onClick="upred(50)"> </td> <td> <input name="red2" type="button" value=" + 10 " onClick="upred(10)"> </ td> <td> <input name="red2" type="button" value=" + 1" onClick="upred(1)"> </td> <td width="50"><font color="# FF0000" size=+3><b><font color="#FA0000">색</font></b></font></td> <td> <input name="red-" type=" 버튼" value=" - 1" onClick="downred(1)"> </td> <td> <input name="red-" type="button" value=" - 10 " onClick="downred(10) "> </td> <td> <input name="red-" type="button" value=" -50 " onClick="downred(50)"> </td> <td> <input type="text " name="rd" size=3> </td> </tr> <tr align="Center"> <td> <input name="green" type="button" value=" +50 " onClick=" upgreen(50)"> </td> <td> <input name="green" type="button" value=" + 10 " onClick="upgreen(10)"> </td> <td> <입력 이름 ="green" type="button" value=" + 1" onClick="upgreen(1)"> </td> <td width="50"><font color="#00FF00" size=+3>< b><font color="#00FA00">색</font></b></font></td> <td> <input name="green-" type="button" value=" - 1" onClick="downgreen(1)"> </td> <td> <input name="green-" type="button" value=" - 10 " onClick="downgreen(10)"> </td> <td > <input name="green-" type="button" value=" -50 " onClick="downgreen(50)"> </td> <td> <input type="text" name="gr" size= 3> </td> </tr> <tr align="Center"> <td> <input name="blue" type="button" value=" +50 " onClick="upblue(50)"> </ td> <td> <input name="blue" type="button" value=" + 10 " onClick="upblue(10)"> </td> <td> <input name="blue" type="버튼 " value=" + 1" onClick="upblue(1)"> </td> <td width="50"><font color="#0000FF" size=+3><b><font color="# 0000FA">설명</font></b></font></td> <td> <input name="blue-" type="button" value=" - 1" onClick="downblue(1)" > </td> <td> <input name="blue-" type="button" value=" - 10 " onClick="downblue(10)"> </td> <td> <input name="blue- " type="button" value=" -50 " onClick="downblue(50)"> </td> <td> <input type="text" name="bl" size=3> </td> </ tr> <tr align="중앙"> <td> </td> <td> </td> <td> </td> <td width="50"> <input type="text" name="rgbdspl " 크기=7> </td> <td> </td> <td> </td> <td> </td> <td> </td> </tr> </table> </form>