软件教程

用ASP实现的一个简单的颜色吸取器

来源: 本站    类别: 软件教程    日期: 2013/5/2

 <%@ Language=VBScript %>
<%
' ASP Code will run on server and Make HTML Page
' Java Script will run on Client Side and Change the background color
' according to movement of Mouse
%>
<html>
<SCRIPT ID=clientEventHandlersJS LANGUAGE=javascript>
<!--
function MakeColor(ThisColor) {
document.bgColor = ThisColor;
}
//-->
</SCRIPT>
<center>
<table cellspacing=2 Border="0">
<tr>
<%
Dim I1, I2, I3            ' Looping variables for RGB ColorFor I1 = 0 to 15 step 3
For I2 = 0 to 15 step 3
For I3 = 0 to 15 step 3
Color = Hex(I1) & Hex(I1) & Hex(I2) & Hex(I2) & Hex(I3) & Hex(I3)%>
<td bgcolor="#<%=Color%>">
<a href="#" LANGUAGE=javascript OnMouseOver="return MakeColor('#<%=Color%>');"><img src=http://www.163design.net/a/y/"clear.gif" width=10 height=10 border="0"></a>
</td>
<%
Next
Next
%>
</tr>
<tr>
<%
Next
%>
</tr>
</table>
</center>
</html>

相关文章


Copyright © 2004 - 2024 CNHWW Inc. All Rights Reserved
石家庄市征红网络科技有限公司版权所有 邮政编码:050051
服务电话:0311-85315152 13931185013 在线客服QQ:81447932 / 81447933 邮箱: cnhww@163.com