|
蓝森林 http://www.lslnet.com 2006年8月25日 8:28
javascript求教!??
请问用javascript怎样可以通过CSS的style透明选项设置一个"form"里多个按钮和多个textbox都半透明,然后鼠标移到和移开会出现渐隐渐现的效果!
谢谢!!! |
[html]
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
<link href="RedSpy.css" rel="stylesheet" type="text/css">
</head>
<style type="text/css">
<!--
-->
</style>
<script language="javascript">
var strNum = 50, timeHandle;
function higher(){
if(strNum<100 ){
strNum += 1;
timeHandle=window.setTimeout("higher()",20);
}
document.images.aa.filters[0].opacity=strNum;
}
function lower()
{
if (strNum>50)
{
strNum -= 1;
timeHandle = window.setTimeout("lower()",5);
}
document.images.aa.filters[0].opacity = strNum;
}
function mouseOver(){
timeHandle=window.setTimeout("higher()",20);
}
function mouseOut(){
clearTimeout(timeHandle);
timeHandle=window.setTimeout("lower()",5);
}
</script>
<body>
<div align="center" >
<table height="430" width="400"><tr><td valign="bottom" align="center">
<a href="#" onMouseOver="mouseOver();" onMouseOut="mouseOut(); " ><img id="aa" src="http://wdesign.yx66.be/gbook/images/icon/icon1.jpg" border="0" style="filter:alpha(opacity=50) "></a> </td>
</tr></table>
</div>
</body>
</html>
[/html] |
|