当前位置:编程学习 > asp >>

ASP编写的一个简单的颜色吸取器

答案:<%@ 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=></td>
<%
Next
Next
%>
</tr>
<tr>
<%
Next
%>
</tr>
</table>
</center>
</html>

上一个:ASP无组件上传·从原理剖析到实践(上)
下一个:ASP用到哪些开发平台

CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,