本站域名:www.lmpx.net 现在时刻: 林木培训
   
-您现在的位置:首页>>
特效名称:背景颜色自己选
实现此效果你需要进行如下 2 步操作: [查看演示效果]
1步:将以下代码加到〈head〉与〈/head〉之间
<SCRIPT>
function colors(c1){
this.c1 = c1;
}
a00 = new colors("FFFBD0");
a01 = new colors("FF0000");
a02 = new colors("FF8080");
a03 = new colors("FF8000");
a04 = new colors("FFFF00");
a05 = new colors("000080");
a06 = new colors("0000FF");
a07 = new colors("008000");
a08 = new colors("00FF00");
a09 = new colors("804000");
a10 = new colors("808000");
a11 = new colors("000000");
a12 = new colors("FFFFFF");
a13 = new colors("C0C0C0");
a14 = new colors("408080");
a15 = new colors("808080");
a16 = new colors("D2BF51");
a17 = new colors("44BBE8");
a18 = new colors("C97AB9");
a19 = new colors("A2C97A");
a20 = new colors("6AE6C4");
a21 = new colors("C0DCB8");
a22 = new colors("33A3D1");
a23 = new colors("6C9AEE");
function changebg(type){
scheme = type;
document.bgColor = scheme.c1;
timerID=setTimeout('document.bgColor = scheme.c2',
document.selector.value * 10);
}
</SCRIPT>
2步:将以下代码加到〈body〉与〈/body〉之间

<FORM name=selector> 

<INPUT style="BACKGROUND-COLOR: rgb(255,251,208)" onclick=changebg(a00) type=button> 
<INPUT style="BACKGROUND-COLOR: rgb(255,0,0)" onclick=changebg(a01) type=button> 
<INPUT style="BACKGROUND-COLOR: rgb(255,128,128)" onclick=changebg(a02) type=button> 
<INPUT style="BACKGROUND-COLOR: rgb(255,128,0)" onclick=changebg(a03) type=button> 
<INPUT style="BACKGROUND-COLOR: rgb(255,255,0)" onclick=changebg(a04) type=button> 
<INPUT style="BACKGROUND-COLOR: rgb(0,0,128)" onclick=changebg(a05) type=button> 
<INPUT style="BACKGROUND-COLOR: rgb(0,0,255)" onclick=changebg(a06) type=button> 
<INPUT style="BACKGROUND-COLOR: rgb(0,128,0)" onclick=changebg(a07) type=button> 
<INPUT style="BACKGROUND-COLOR: rgb(0,255,0)" onclick=changebg(a08) type=button> 
<INPUT style="BACKGROUND-COLOR: rgb(128,0,0)" onclick=changebg(a09) type=button> 
<INPUT style="BACKGROUND-COLOR: rgb(128,128,0)" onclick=changebg(a10) type=button> 
<INPUT style="BACKGROUND-COLOR: rgb(0,0,0)" onclick=changebg(a11) type=button> 
<INPUT style="BACKGROUND-COLOR: rgb(255,255,255)" onclick=changebg(a12) type=button> 
<INPUT style="BACKGROUND-COLOR: rgb(192,192,192)" onclick=changebg(a13) type=button> 
<INPUT style="BACKGROUND-COLOR: rgb(64,128,128)" onclick=changebg(a14) type=button> 
<INPUT style="BACKGROUND-COLOR: rgb(128,128,128)" onclick=changebg(a15) type=button> 
<INPUT style="BACKGROUND-COLOR: rgb(210,191,81)" onclick=changebg(a16) type=button> 
<INPUT style="BACKGROUND-COLOR: rgb(68,187,232)" onclick=changebg(a17) type=button> 
<INPUT style="BACKGROUND-COLOR: rgb(201,122,185)" onclick=changebg(a18) type=button> 
<INPUT style="BACKGROUND-COLOR: rgb(162,201,122)" onclick=changebg(a19) type=button> 
<INPUT style="BACKGROUND-COLOR: rgb(106,230,196)" onclick=changebg(a20) type=button> 
<INPUT style="BACKGROUND-COLOR: rgb(192,220,184)" onclick=changebg(a21) type=button> 
<INPUT style="BACKGROUND-COLOR: rgb(51,163,209)" onclick=changebg(a22) type=button> 
<INPUT style="BACKGROUND-COLOR: rgb(108,154,238)" onclick=changebg(a23) type=button> 

</FORM>


林木培训
您的位置..
       
               

关于本站 | 本站地图 | 联系方式 | 广告合作 | 广告价格
QQ:284700360 Email:linmupeixun@163.com
Copy Right © 2006 林木培训版权所有