兼容IE6 IE7 FF的显示隐藏菜单测试版

<script type="text/javascript"> </script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script>
http://www.corange.cn//uploadfiles/0922-1_53698.jpg

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>www.5study.net</title>
<style type="text/css">
*{ margin:0px; padding:0px; border:0px; }
body{ font-size:12px; color:#333;text-align:center;}
.Test5study{ background:#fff;}
.Test5study{text-align:left;width:220px;height:auto;border:solid 1px #F7BE21;margin:10px auto 0px;overflow: hidden;position: absolute;left: 10px;top: 0px; }
.Test5study h2{font-size:14px;height:22px;line-height:22px;background:#FFF7C6;text-indent:10px;position:relative;border-top: 1px solid #fff;border-bottom: 1px solid #F7BE21; font-weight:normal;cursor:pointer;}
.Test5study h2 span{font-weight: normal;position:absolute;top:0;right:6px;}
.Test5study li{border-bottom:dashed 1px #eee;}
.Test5study {border-bottom:solid 1px #F7BE21;}
.TxtList{ list-style:disc url(none); margin:6px 10px 6px 20px;}
</style>
</head>
<body>
<div id="Test5study" class="Test5study">
<h2 id="t1" οnclick="ShHi('t1','h1');">传说中的标题<span>更多...</span></h2>
<ul class="TxtList" id="h1" style="display:none;">
<li>请帮忙把这段代码再优化优化...</li>
<li>请帮忙把这段代码再优化优化...</li>
<li>请帮忙把这段代码再优化优化...</li>
<li>请帮忙把这段代码再优化优化...</li>
</ul>
<h2 id="t2" οnclick="ShHi('t2','h2');">传说中的标题<span>更多...</span></h2>
<ul class="TxtList" id="h2" style="display:none;">
<li>请帮忙把这段代码再优化优化...</li>
<li>请帮忙把这段代码再优化优化...</li>
<li>请帮忙把这段代码再优化优化...</li>
<li>请帮忙把这段代码再优化优化...</li>
</ul>
<h2 id="t3" οnclick="ShHi('t3','h3');">传说中的标题<span>更多...</span></h2>
<ul class="TxtList" id="h3" style="display:none;">
<li>请帮忙把这段代码再优化优化...</li>
<li>请帮忙把这段代码再优化优化...</li>
<li>请帮忙把这段代码再优化优化...</li>
<li>请帮忙把这段代码再优化优化...</li>
</ul>
<h2 id="t4" οnclick="ShHi('t4','h4');">传说中的标题<span>更多...</span></h2>
<ul class="TxtList" id="h4" style="display:none;">
<li>请帮忙把这段代码再优化优化...</li>
<li>请帮忙把这段代码再优化优化...</li>
<li>请帮忙把这段代码再优化优化...</li>
<li>请帮忙把这段代码再优化优化...</li>
</ul>
</div>
<script type="text/javascript">
var clickul,clickh;
function $(d){return document.getElementById(d);}
function f(d){var t=$(d);if (t){return t.style;}else{return null;}}
function Hi(){if(clickul)clickul.style.display='none';}
function Hl(){if(clickh)clickh.style.fontWeight='normal';}
function h(d){var s=f(d);var b=s.display;if (b=='none'){return true;}else{return false;}}
function ShHi(ii,jj){if(h(jj)){Hi();Hl();f(jj).display='block';f(ii).fontWeight='bold';clickul=$(jj);clickh=$(ii);}else{Hi();Hl();f(jj).display='none';f(ii).fontWeight='normal';clickul=null;clickh=null;}}
</script>
</body>
</html>
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值