欢迎光临
我们一直在努力

一个很好的效果,隐藏表格

建站超值云服务器,限时71元/月

<html>
<ahead>
<title>隐藏表格</title>
<meta http-equiv="content-type" content="text/html; charset=gb2312">
<style type="text/css">
<!–
td { font-size: 12px; line-height: 150%}
–>
</style>
<script language="javascript">
<!–

function hve_display(t_id,i_id){//显示隐藏程序
var t_id;//表格id
var i_id;//图片id
var on_img="on.gif";//打开时图片
var off_img="off.gif";//隐藏时图片
if (t_id.style.display == "none") {//如果为隐藏状态
t_id.style.display="";//切换为显示状态
i_id.src=on_img;}//换图
else{//否则
t_id.style.display="none";//切换为隐藏状态
i_id.src=off_img;}//换图
}

//–>
</script>
</head>

<body bgcolor="#ffffff" text="#000000">
<table width="500">
<tr>
<td>
<table width="200" border="0" cellspacing="1" cellpadding="0" bgcolor="#006699">
<tr bgcolor="#006699">
<td> </td>
<td width="20"><img src="on.gif" width="17" height="14" name="img1" onclick="hve_display(table1,img1)" style="cursor:

hand"></td>
</tr><!–图片的id是img1,要隐藏的表格id是table1,onclick调用hve_display程序;style设置鼠标为手型。–>
</table>
<table id="table1" width="200" border="0" cellspacing="1" cellpadding="0" bgcolor="#006699" height="120">
<tr bgcolor="#ffffff">
<td bgcolor="#7aacfe">  </td>
</tr>
</table>

<br>
<table width="200" border="0" cellspacing="1" cellpadding="0" bgcolor="#006699">
<tr bgcolor="#006699">
<td> </td>
<td width="20"><img src="on.gif" width="17" height="14" name="img2" onclick="hve_display(table2,img2)" style="cursor:

hand"></td>
</tr>
</table>
<table id="table2" width="200" border="0" cellspacing="1" cellpadding="0" bgcolor="#006699" height="120">
<tr bgcolor="#ffffff">
<td bgcolor="#7aacfe">  </td>
</tr>
</table>

</td>
</tr>
</table>
</body>
</html>

赞(0)
版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com 特别注意:本站所有转载文章言论不代表本站观点! 本站所提供的图片等素材,版权归原作者所有,如需使用,请与原作者联系。未经允许不得转载:IDC资讯中心 » 一个很好的效果,隐藏表格
分享到: 更多 (0)

相关推荐

  • 暂无文章