本版
查看: 13207|回复: 2

javascript展开与合拢

[复制链接]
标签: javascript  

[Lv.6]大萝卜

楼主(1#)
发表于 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

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

支持 | 反对  0 支持 / 0 反对 评分 举报

Super Moderator

沙发(2#)
发表于 2012-8-13 19:48:12 | 只看该作者
测试成功

Super Moderator

板凳(3#)
发表于 2014-6-6 19:20:38 | 只看该作者
百度网盘链接已删除

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

GMT+8, 2026-10-19 13:43 , Processed in 0.07 second(s), 20 queries , Gzip On.

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