中文(繁体)
<!-- http://www.downcodes.com --> <!-- bbs http://www.downcodes.com/bbs--> <!-- 把如下程式碼加入<body>區域- -> <script language="JavaScript"> <!-- 隱藏var red=0; var 綠色=0; var 藍色=0;變數值=0; var conversion = new Array() var hexbase= new Array("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];值++; } } 函數clear(){ document.color.bl.value= blue; document.color.rd.value=紅色; document.color.gr.value=綠色; } 函數顯示(){ redx = 轉換[紅色] greenx = 轉換[綠色] bluex = 轉換[藍色] var rgb = "#"+redx+greenx+bluex; document.color.rgbdspl.value=rgb;文檔.bgColor = rgb; } function upred(x){ if ((red+x)<=255) red+=x document.color.rd.value= red; display() } function downred(x){ if ((red-x)>=0) red-=x document.color.rd.value= red; display() } function upgreen(x){ if ((green+x)<=255) green+=x document.color.gr.value= green; display() } function 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() } function downblue(x){ if ((blue-x)>=0) blue-=x document.color.bl.value= blue; display() } // 完成隱藏 --> </script> <form name="color"> <tablealign="center"> <tralign="Center"> <td width="52"> <input name =" red" type="button" value=" +50 " onClick="upred(50)"> </td> <td width="58"> <input name="red2" type="button" value= " + 10 " onClick="upred(10)"> </td> <td width="46"> <input name="red2" type="button" value=" + 1" onClick="upred(1) "> </td> <td width="52"><font color="#FF0000" size=+3><b><font color="#FA0000"face="楷體_GB2312">紅色</font >< /b></font></td> <td width="46"> <input name="red-" type="button" value="- 1" onClick="downred(1)"> < /td > <td width="58"> <input name="red-" type="button" value=" - 10 " onClick="downred(10)"> </td> <td width="52" > < input name="red-" type="button" value="-50" onClick="downred(50)"> </td> <td width="29"> <input type="text" name= “rd ”尺寸= 3> </ td> </ tr> <tr對齊=“中心”> <td寬度=“52”> <輸入名稱=“綠色”類型=“按鈕”值=“+50”onClick =" upgreen(50)"> </td> <td width="58"> <input name="green" type="button" value=" + 10 " onClick="upgreen(10)"> </td > < td width="46"> <input name="green" type="button" value=" + 1" onClick="upgreen(1)"> </td> <td width="52"><font color= "#00FF00" size=+3><b><font color="#00FA00"face="楷體_GB2312">綠色</font></b></font></td> <td寬度=" 46"> <input name="green-" type="button" value=" - 1" onClick="downgreen(1)"> </td> <td width="58"> <input name="綠色- " type="button" value=" - 10 " onClick="downgreen(10)"> </td> <td width="52"> <input name="green-" type="button" value= " - 50 " onClick="downgreen(50)"> </td> <td width="29"> <input type="text" name="gr" size=3> </td> </tr> < tralign= "Center"> <td width="52"> <input name="blue" type="button" value=" +50 " onClick="upblue(50)"> </td> <td width= "58" > <input name="blue" type="button" value=" + 10 " onClick="upblue(10)"> </td> <td width="46"> <input name="blue" type=" button" value=" + 1" onClick="upblue(1)"> </td> <td width="52"><font color="#0000FF" size=+3><b><font color=" #0000FA"face="楷體_GB2312">藍色</font></b></font></td> <td width="46"> <input name="blue-" type="按鈕" value=" - 1" onClick="downblue(1)"> </td> <td width="58"> <input name="blue-" type="button" value=" - 10 " onClick= “downblue (10)”> </td> <td width="52"> <input name="blue-" type="button" value="-50" onClick="downblue(50)"> </td > < td width="29"> <input type="text" name="bl" size=3> </td> </tr> <tralign="Center"> <td width="52"> < / td> <td寬度=“58”> </td> <td寬度=“46”> </td> <td寬度=“52”> <輸入類型=“文字”名稱=“rgbdspl”大小= 7 > </ td> <td 寬度=“46”> </td> <td 寬度=“58”> </td> <td 寬度=“52”> </td> <td 寬度=“29”> < /td> </tr> </table> <divalign="center"></div> <divalign="center"></div> </form>