上一页 返回教程首页 下一页
名称
背景色代码调色板
实例
教程
第一步:拷贝下面的代码到你的html文件的<head>和</head>之间;
<Script Language="JavaScript"> </Script>
第二步:修改你的<body>语句为;<BODY onLoad="clear();display()" BGCOLOR="#000000">
<CENTER> <FORM Name="color"> <TABLE> <TR Align="Center"><TD><INPUT NAME="red" type="button" VALUE=" +50 " onclick="upred(50)"></TD><TD><INPUT NAME="red" type="button" VALUE=" + + " onclick="upred(10)"></TD><TD><INPUT NAME="red" type="button" VALUE=" + " onclick="upred(1)"> </TD><TD><Font Color="#FF0000" size=+3>RED</font></TD> <TD><INPUT NAME="red-" type="button" VALUE=" - " onclick="downred(1)"></TD><TD><INPUT NAME="red-" type="button" VALUE=" - - " 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=" + + " onclick="upgreen(10)"></TD><TD><INPUT NAME="green" type="button" VALUE=" + " onclick="upgreen(1)"></TD> <TD><Font Color="#00FF00" size=+3>GREEN</font></TD> <TD><INPUT NAME="green-" type="button" VALUE=" - " onclick="downgreen(1)"></TD><TD><INPUT NAME="green-" type="button" VALUE=" - - " 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=" + + " onclick="upblue(10)"></TD><TD><INPUT NAME="blue" type="button" VALUE=" + " onclick="upblue(1)"></TD> <TD><Font Color="#0000FF" size=+3>BLUE</font></TD> <TD><INPUT NAME="blue-" type="button" VALUE=" - " onclick="downblue(1)"></TD><TD><INPUT NAME="blue-" type="button" VALUE=" - - " 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> </TABLE> <Input type="text" Name="rgbdspl" Size=7> </FORM> </CENTER>
第三步:拷贝下面的代码到你的html文件的<body>和</body>之间;
说明: