分享

简单的树菜单

 crystyleEye 2013-03-14
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www./TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www./1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>简单的树菜单</title>
<script type="text/javascript">
var c = null;
function show(d1){
var o = document.getElementById(d1);
if(o != null){
if(o.style.display == 'none'){
o.style.display = 'block';
if(c && c != o){
c.style.display = 'none';
}
c = o;
}else{
o.style.display = 'none'; 
}
}
return false;
}
</script>
<style type="text/css">
<!--
ul {
list-style-image: none;
list-style-type: none;
}
-->
</style>
</head>
<body>
<div>
<ul>
<li style="width:100px;height:25px; background-color:#cccccc;"><a href="" onclick="return show('b')">流行语言</a></li>
<li id="b" style="width:100px;height:100px; background-color:#666666; display:none;">ASP</li>
<li style="width:100px;height:25px; background-color:#cccccc;"><a href="" onclick="return show('c')">经典语言</a></li>
<li id="c" style="width:100px;height:100px; background-color:#666666; display:none;">php</li>
<li style="width:100px;height:25px; background-color:#cccccc;"><a href="" onclick="return show('d')">移动开发</a></li>
<li id="d" style="width:100px;height:100px; background-color:#666666; display:none;">Android</li>
</ul>
</div>
</body>
</html>

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约