最简单的javascript 竖向菜单

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <script type="text/javascript">
        function k1(vd) {
            var ob = document.getElementById(vd);
            ob.style.display = "none";
            //var ob2 = document.getElementById('s' + vd);            
        }

        function k0(vd) {
            var ob = document.getElementById(vd);            
            ob.style.display = "block";
            //var ob2 = document.getElementById('s' + vd);        
        }
    
    </script>

    <style type="text/css">
        .b
        {
            width:100px;
           margin:5px,auto,5px,auto;
           padding:2px,2px;
           background-color:Gray;
           line-height:35px;
           font-family:@Arial Unicode MS;
           font-size:18px;         
        }
        .ps
        {
               display:none;
            }
    
    </style>
</head>
<body>
 
  <div id="sfgc91" class="b" οnmοusemοve="k0('fgc91')" οnmοuseοut="k1('fgc91')"  οnclick="k0('fgc91')" >
      <a target="FrameRight" href="#">菜单1</a>
      <div class="ps" id="fgc91">
       <div class="b"><a target="FrameRight" href="#">1-1</a></div>
       <div class="b"><a target="FrameRight" href="#">1-2</a></div>
       <div class="b"><a target="FrameRight" href="#">1-3</a></div>
      </div>
  </div>

   <div id="sfgc92" class="b" οnmοusemοve="k0('fgc92')" οnmοuseοut="k1('fgc92')"  οnclick="k0('fgc92')">
      <a target="FrameRight" href="#">菜单2</a>
      <div class="ps" id="fgc92">
       <div class="b"><a target="FrameRight" href="#">2-1</a></div>
       <div class="b"><a target="FrameRight" href="#">2-2</a></div>
       <div class="b"><a target="FrameRight" href="#">2-3</a></div>
      </div>
  </div>

   <div id="sfgc93" class="b" οnmοusemοve="k0('fgc93')" οnmοuseοut="k1('fgc93')"  οnclick="k0('fgc93')">
      <a target="FrameRight" href="#">菜单3</a>
      <div class="ps" id="fgc93">
       <div class="b"><a target="FrameRight" href="#">3-1</a></div>
       <div class="b"><a target="FrameRight" href="#">3-2</a></div>
       <div class="b"><a target="FrameRight" href="#">3-3</a></div>
      </div>
  </div>

</body>
</html>

转载于:https://www.cnblogs.com/lizihong/p/4012626.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值