js.1 树形菜单--层的使用

<!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=gb2312" />
<title>无标题文档</title>
<script language="javascript">
function show(a)
{
    if(document.getElementById(a).style.display=="none")
    {
        document.getElementById(a).style.display="block";
    }
    else
    {
        document.getElementById(a).style.display="none";
    }
}
</script>
<style type="text/css">
<!--

.STYLE1 {font-size: small}
-->
</style>
</head>

<body>
<div><p><img src="images1/z-1.jpg" width="32" height="16" onclick="show('1')" /><span class="STYLE1">账号服务</span></p>
</div>
<div class="STYLE1" id="1" position:absolute;
style="display:none"
    left:34px;
    top:44px;
    
    height:154px;
    z-index:1;>
  <table width="270" border="0">
    <tr>
      <td width="264"><img src="images1/z-top.gif" alt="1" width="18" height="18" />申请QQ账号</td>
    </tr>
    <tr>
      <td><img src="images1/z-top.gif" alt="1" width="18" height="18" />申请密码保护</td>
    </tr>
    <tr>
      <td><img src="images1/z-top.gif" alt="2" width="18" height="18" />找回QQ账号</td>
    </tr>
    <tr>
      <td><img src="images1/z-top.gif" alt="3" width="18" height="18" />恢复QQ好友和群</td>
    </tr>
    <tr>
      <td><img src="images1/z-top.gif" alt="5" width="18" height="18" />QQ安全问题求助</td>
    </tr>
    <tr>
      <td><img src="images1/z-end.gif" alt="1" width="18" height="18" />客服中心</td>
    </tr>
  </table>
</div>
<div><img src="images1/z-2.jpg" width="32" height="16"  onclick="show('2')"/><span class="STYLE1">最新上传</span></div>

<div class="STYLE1" id="2" position:absolute;="position:absolute;"
style="display:none"
    left:34px;="left:34px;"
    top:44px;="top:44px;"
    
    height:154px;="height:154px;"
    z-index:1;="z-index:1;">
  <table width="270" border="0">
    <tr>
      <td width="264"><img src="images1/z-top.gif" alt="1" width="18" height="18" />QQ皮肤</td>
    </tr>
    <tr>
      <td><img src="images1/z-top.gif" alt="1" width="18" height="18" />QQ表情</td>
    </tr>
    <tr>
      <td><img src="images1/z-top.gif" alt="2" width="18" height="18" />QQ桌面</td>
    </tr>
    <tr>
      <td><img src="images1/z-top.gif" alt="3" width="18" height="18" />QQ主题</td>
    </tr>
  </table>
</div>
<div><img src="images1/z-3.jpg" width="32" height="16"  onclick="show('3')"/><span class="STYLE1">下载QQ</span></div>
<div class="STYLE1" id="3" position:absolute;="position:absolute;"
style="display:none"
    left:34px;="left:34px;"
    top:44px;="top:44px;"
    
    height:154px;="height:154px;"
    z-index:1;="z-index:1;">
  <table width="270" border="0">
    <tr>
      <td width="264"><img src="images1/z-top.gif" alt="1" width="18" height="18"  onclick="show(3)"/>Windows版</td>
    </tr>
    <tr>
      <td><img src="images1/z-top.gif" alt="1" width="18" height="18" />手机版</td>
    </tr>
    <tr>
      <td><img src="images1/z-top.gif" alt="2" width="18" height="18" />Pad版</td>
    </tr>
    <tr>
      <td><img src="images1/z-top.gif" alt="3" width="18" height="18" />网页版</td>
    </tr>
    <tr>
      <td><img src="images1/z-top.gif" alt="5" width="18" height="18" />Mac版</td>
    </tr>
    <tr>
      <td><img src="images1/z-end.gif" alt="1" width="18" height="18" />Linux版</td>
    </tr>
  </table>
</div>
<p>&nbsp; </p>
</body>
</html>


你可能感兴趣的:(js.1 树形菜单--层的使用)