zoukankan      html  css  js  c++  java
  • 最简单的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
            {
                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" onmousemove="k0('fgc91')" onmouseout="k1('fgc91')"  onclick="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" onmousemove="k0('fgc92')" onmouseout="k1('fgc92')"  onclick="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" onmousemove="k0('fgc93')" onmouseout="k1('fgc93')"  onclick="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>

  • 相关阅读:
    UPC OJ 一道水题 STL
    POJ2387 Til the Cows Come Home(SPFA + dijkstra + BallemFord 模板)
    HD1385Minimum Transport Cost(Floyd + 输出路径)
    POJ1679The Unique MST(次小生成树)
    POJ 1789Truck History(pirme)
    POJ2309BST(树状数组)
    POJ2299Ultra-QuickSort(归并排序 + 树状数组求逆序对)
    POJ2531Network Saboteur(DFS+剪枝)
    Codeforce#331 (Div. 2) A. Wilbur and Swimming Pool(谨以此题来纪念我的愚蠢)
    POJ2485Highways(prime 水题)
  • 原文地址:https://www.cnblogs.com/lizihong/p/4012626.html
Copyright © 2011-2022 走看看