杏阳 发表于 2012-8-11 15:12:28

javascript展开与合拢


<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

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

nkc3g4 发表于 2012-8-13 19:48:12

测试成功

nkc3g4 发表于 2014-6-6 19:20:38

百度网盘链接已删除
页: [1]
查看完整版本: javascript展开与合拢