首页酷站欣赏网页素材域名空间建站指南网站推广解决方案网络创业相关知识
网站导航您的位置 - [首页]-网页特效>
 表格颜色板

[查看演示]  源码如下
----------------------------------------------------------
<html>
<head>
<title>Untitled Document-www.51windows.Net</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<!--- Designed By Fellow 12/2001 --->
<!--- Copyright(c)Fellow's Own World,2001 --->
<META name="author" content="fellow99@163.net">
<META NAME="DESCRIPTION" CONTENT="Fellow's Own World">
<style type="text/css">
<!--
body {font:menu}
td,selcet,input { font:menu}
.memo { border: 1px #dddddd solid}
.button { border-color: #CCCCCC #666666 #666666 #CCCCCC; border-style: solid; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px}
.cursorcross { cursor: crosshair}
.cursorhand { cursor: hand}
-->
</style>
</head>

<body bgcolor="#FFFFFF" text="#000000">
<div align="center"><b><font color="#003366">Fellow牌调色板 Ver1.1</font></b><br>
<br>
</div>
<table border="0" cellspacing="1" cellpadding="3" width="350" align="center" bgcolor="#dddddd">
<tr bgcolor="#FFFFFF">
<td width="10%" align="center">
<select name="select1" onchange="selectchg(this.value)">
<option value="1" selected>红</option>
<option value="2">绿</option>
<option value="3">蓝</option>
<option value="4">灰</option>
</select>
</td>
<td width="90%" align="center">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="right">
<input type="text" name="text1" class="memo" size="10">
<input type="button" name="Button2" value="&gt;&gt;" class="button" onClick="choosecolor()">
</td>
<td align="right" width="3%">&nbsp;</td>
<td width="30%">
<table width="40" border="0" cellspacing="1" cellpadding="0" height="20" class="cursorcross">
<tr>
<td id="customcolor" bgcolor="#FFFFFF" onMouseOver="showcolor(this)">&nbsp;</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr bgcolor="#FFFFFF">
<td width="10%" align="center">
<table id="tableleft" border="0" cellspacing="1" cellpadding="0" class="cursorhand">
<script language="VBScript">
function hexit(which)
hexit=hex(which)
end function
</script>
<script language="JavaScript">
for(i=0;i<=15;++i)
{document.write('<tr><td align="center">'+ hexit(0+i*17) +'</td><td id="tdleft' + i +'" bgcolor="rgb('+ (0+i*17) + ',0,0)" width="15" height="15" onclick="changeright(this.num)" onmouseover="showcolor(this)"></td></tr>')
document.all['tdleft' + i].num=i
}
</script>
</table>
</td>
<td align="center" width="90%">
<table id="tableleft" border="0" cellspacing="1" cellpadding="0" class="cursorcross">
<script language="JavaScript">
document.write('<tr><td></td>')
for(i=0;i<=15;++i)
{document.write('<td align="center">'+ hexit(0+i*17) +'</td>')}
document.write('</tr>')

for(i=0;i<=15;++i)
{document.write('<tr>')
document.write('<td align="center">'+ hexit(0+i*17) +'</td>')
for(j=0;j<=15;++j)
{document.write('<td id="tdrightr' + i + 'c' + j +'" bgcolor="rgb(0,'+ (0+i*17) + ',' + (0+j*17) + ')" width="15" height="15" onmouseover="showcolor(this)" onclick="clickright(this)"></td>')}
document.write('</tr>')
}

</script>
</table>
</td>
</tr>
<tr bgcolor="#FFFFFF">
<td colspan="2" height="20">·可选16*16*16种颜色。<br>
·单击左边的颜色会得到更多的颜色。<br>
·单击右边的颜色会固定选取的颜色。 <br>
·输入框可以自定义颜色。</td>
</tr>
</table>
<script language="JavaScript">
function selectchg(which)
{switch(which)
{case '1' :leftR();break;
case '2' :leftG();break;
case '3' :leftB();break;
case '4' :leftA();break;
}
}
function leftR()
{for(i=0;i<=15;++i)
{document.all['tdleft'+i].bgColor='rgb('+ (0+i*17) + ',0,0)'}
rightR(0)
}
function leftG()
{for(i=0;i<=15;++i)
{document.all['tdleft'+i].bgColor='rgb(0,'+ (0+i*17) + ',0)'}
rightG(0)
}
function leftB()
{for(i=0;i<=15;++i)
{document.all['tdleft'+i].bgColor='rgb(0,0,'+ (0+i*17) + ')'}
rightB(0)
}
function leftA()
{for(i=0;i<=15;++i)
{document.all['tdleft'+i].bgColor='rgb('+ (0+i*17) + ','+ (0+i*17) + ','+ (0+i*17) + ')'}
rightA()
}
function rightR(which)
{for(i=0;i<=15;++i)
{for(j=0;j<=15;++j)
{document.all['tdrightr' + i + 'c' + j].bgColor='rgb(' + (0+which*17) + ',' + (0+i*17) + ','+ (0+j*17) + ')'}
}
}
function rightG(which)
{for(i=0;i<=15;++i)
{for(j=0;j<=15;++j)
{document.all['tdrightr' + i + 'c' + j].bgColor='rgb(' + (0+i*17) + ',' + (0+which*17) + ',' + (0+j*17) + ')'}
}
}
function rightB(which)
{for(i=0;i<=15;++i)
{for(j=0;j<=15;++j)
{document.all['tdrightr' + i + 'c' + j].bgColor='rgb(' + (0+i*17) + ','+ (0+j*17)+ ',' + (0+which*17) + ')'}
}
}
function rightA()
{for(i=0;i<=15;++i)
{for(j=0;j<=15;++j)
{document.all['tdrightr' + i + 'c' + j].bgColor='rgb(' + (0+i*16+j) + ','+ (0+i*16+j)+ ',' + (0+i*16+j) + ')'}
}
}
var rightclicked=false
function clickright(which)
{if(rightclicked){rightclicked=false;showcolor(which)}else{rightclicked=true}
}
function changeright(which)
{switch(select1.value)
{case '1' :rightR(which);break;
case '2' :rightG(which);break;
case '3' :rightB(which);break;
}
}
function showcolor(which)
{if(rightclicked)return;
text1.value=which.bgColor
choosecolor()
}
function choosecolor()
{customcolor.bgColor=text1.value
}
</script>
</body>
</html>

<div style="position: absolute; top: 10; right: 10; width: 148; height: 18;cursor:hand">
<input type="button" name="Button" value="查看源代码" onClick= 'window.location = "view-source:" + window.location.href'></div>


最后更新:2007-12-18 14:55:07【返回】 【打印】
责任编辑:大连网站建设团队-大连零壹工作室
技术专题
PhotoshopDreamweaverFlash综合设计DIV+CSS网页特效搜索优化综合应用
推荐阅读
网站设计的10个要点..怎么样做有特色的网站..企业网站建设中常用中英文对..
联系方式
地  址:大连门广场1号
邮  编:116033
客户业务:
服务电话:0411-86730554
手  机:13052795629
msn:hui0t0@hotmail.com
QQ: 207111
www.ceo.gov.cn ©2007网页设计加油站版权所有