萝卜头IT论坛

搜索
查看: 5495|回复: 2
收起左侧

javascript展开与合拢

[复制链接]
发表于 2012-8-11 15:12:28 | 显示全部楼层 |阅读模式

<html>
<head>
<meta content="text/html;charset=utf-8">
<title>展开与合拢</title>
<script>
function te_show(f)
{
var oti=document.getElementById("ti0"+f);
var ote=document.getElementById("te0"+f);
if(ote.style.display=="none")
{
ote.style.display="block";
}
else
{
ote.style.display="none";
}
}
</script>
</head>
<body>
<div id="ti01" style="width:200px;line-height:20px;border:#000 solid
1px;cursor:pointer; margin-bottom:2px;">Title1</div>
<div id="te01" style="width:200px;line-height:20px;height:100px;display:none;border:#ccc solid 1px;margin-bottom:2px;">
Text1
</div>
<div id="ti02" style="width:200px;line-height:20px;border:#000 solid 1px;cursor:pointer; margin-bottom:2px;">Title2</div>
<div id="te02" style="width:200px;line-height:20px;height:100px;display:none;border:#ccc solid 1px;">
Text2
</div>
</body>
</html>



展开与合拢.html
http://kuai.xunlei.com/d/OKEXHLHGHYXA

网盘下载、:可恶的百度!
回复

使用道具 举报

发表于 2012-8-13 19:48:12 | 显示全部楼层
测试成功
回复

使用道具 举报

发表于 2014-6-6 19:20:38 | 显示全部楼层
百度网盘链接已删除
回复

使用道具 举报

联系我们(Contact)|手机版|萝卜头IT论坛 ( 苏ICP备15050961号-1 )

GMT+8, 2024-4-26 23:52 , Processed in 0.109839 second(s), 22 queries , Gzip On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表