加入收藏-方便您以后查找网页特效哦
你的位置:
主页
>>
背景特效
背景调色板
加入如下代码到body区域
<script language="JavaScript"> var hex = new Array(6) hex[0] = "FF" hex[1] = "CC" hex[2] = "99" hex[3] = "66" hex[4] = "33" hex[5] = "00" function display(triplet) { document.body.style.backgroundColor = '#' + triplet alert('现在的背景色是 #'+triplet) } function drawCell(red, green, blue) { document.write('<TD BGCOLOR="#' + red + green + blue + '">') document.write('<A HREF="javascript:display(\'' + (red + green + blue) + '\')">') document.write('<IMG SRC="place.gif" BORDER=0 HEIGHT=12 WIDTH=12>') document.write('</A>') document.write('</TD>') } function drawRow(red, blue) { document.write('<TR>') for (var i = 0; i < 6; ++i) { drawCell(red, hex[i], blue) } document.write('</TR>') } function drawTable(blue) { document.write('<TABLE CELLPADDING=0 CELLSPACING=0 BORDER=0>') for (var i = 0; i < 6; ++i) { drawRow(hex[i], blue) } document.write('</TABLE>') } function drawCube() { document.write('<TABLE CELLPADDING=5 CELLSPACING=0 BORDER=1><TR>') for (var i = 0; i < 6; ++i) { document.write('<TD BGCOLOR="#FFFFFF">') drawTable(hex[i]) document.write('</TD>') } document.write('</TR></TABLE>') } drawCube() </script>
COPYRIGHT © 2003-2005 ALL RIGHTS RESERVED
业务联系
|
广告服务
|
网站建设
|
关于我们
|
免责声明
月光宝盒工作室
800*600