表格或层往下慢慢展开的效果
时间:2007-02-18 来源:PHP爱好者
提示:您可以先修改部分代码再运行 <html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>php爱好者</title>
</head>
<body>
<script language="JavaScript">
var act;
function over(){
var h = parseInt(mytd.height);
if (h < 164){
mytd.height = h + 2;
clearTimeout(act);
act = setTimeout('over()', 10);
}
}
function out(){
var h = parseInt(mytd.height);
if (h > 30){
mytd.height = h - 2;
clearTimeout(act);
act = setTimeout('out()', 10);
}
}
</script>
<table width="316" height="30" border="2" cellpadding="0" cellspacing="0" id="mytd" onMouseOver="over()" onMouseOut="out()">
<tr>
<td>这里面填写内容[url]www.phpfans.net[/url]<br>php爱好者</td>
</tr>
</table>
</body>
</html>
提示:您可以先修改部分代码再运行
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>php爱好者</title>
</head>
<body>
<script language="JavaScript">
var act;
function over(){
var h = parseInt(mytd.height);
if (h < 164){
mytd.height = h + 2;
clearTimeout(act);
act = setTimeout('over()', 10);
}
}
function out(){
var h = parseInt(mytd.height);
if (h > 30){
mytd.height = h - 2;
clearTimeout(act);
act = setTimeout('out()', 10);
}
}
</script>
<table width="316" height="30" border="2" cellpadding="0" cellspacing="0" id="mytd" onMouseOver="over()" onMouseOut="out()">
<tr>
<td>这里面填写内容[url]www.phpfans.net[/url]<br>php爱好者</td>
</tr>
</table>
</body>
</html>
提示:您可以先修改部分代码再运行
相关阅读 更多 +