• DIV 层切换


    <html>
        <head>
            <title>tab控件</title>
     
     

        </head>
        <body>
           
           
            
            
            
            
    <div class="bdtg-tit">
       <ul id="oUlTab">
     <li class="on"><a href="#"><p>a</p></a></li>
     
     
     <li><a href="#"><p>b</p></a></li>
     
     
     <li><a href="#"><p>c</p></a></li>
    </ul>
    </div>


    <div class="bq_d" id="oDivTab1">
    <div class="bq_n">
    <div class="bdtg-list">
     <table width="100%" cellpadding="0" cellspacing="0" border="0">
     <tr>
      <td i Align="top">
      content1
      </td>
     </tr>
    </table>
    </div>

    </div>
    </div>


    <div class="bq_d" id="oDivTab2" style="DISPLAY: none">
    <div class="bq_n">

     <div class="bdtg-list">
     
     <table width="100%" cellpadding="0" cellspacing="0" border="0">
     <tr>
      <td  vAlign="top">
       content2
      </td>
     </tr>
    </table>
     
     
    </div> 
    </div>
    </div> 
     
     
    <div class="bq_d" id="oDivTab100" style="DISPLAY: none">
    <div class="bq_n">
    <div class="bdtg-list">
     
     
    <table width="100%" cellpadding="0" cellspacing="0" border="0">
     <tr>
      <td   vAlign="top">
       content3
       
       </td>
     </tr>
    </table>
     
     
     
    </div>
    </div>
    </div>
     
     


           
            </body>
           
    </html>

    <SCRIPT language=JavaScript>
     <!--

        var nFocus = 0;
        var bFlag = false;
        var aLiTab, aDivTab;
        function c1() {
       
       
       
                var $ = function c($) {
                    return document.getElementById($);
                };
           
           
               aLiTab = $("oUlTab").getElementsByTagName("li");
               aDivTab = [$("oDivTab1"), $("oDivTab2"), $("oDivTab100")];
           
            for (var i = 0; i < aLiTab.length; i++) {
                (
               
                function(i) {
                                var t = aLiTab[i];
                                t.onclick = function c() {
                                    if (nFocus != i) {
                                        aLiTab[nFocus].className = "";
                                        aDivTab[nFocus].style.display = "none";
                                        nFocus = i;
                                        aLiTab[nFocus].className = "on";
                                        aDivTab[nFocus].style.display = "";
                                    }
                                    bFlag = true;
                                };
                                t.onmouseout = function c() {
                                    bFlag = false;
                                };
                     }
               
               
                ) (i);
            }
        };
     
     //-->
    </SCRIPT>


    <script type="text/javascript">

        window.onload = function() {
           c1();
    }

    </script>
       
      
     

  • 相关阅读:
    spark map和mapPartitions的区别
    RDD实例
    Scala类和对象
    Scala的集合框架
    Scala的to和until
    用不同RequestMethod制作出restful规范的应用
    isc-dhcp-server的分配的地址列表在哪,linux/树莓派做无线路由器怎么查看已连接设备
    在java中实现通过身份证号码判断籍贯的小工具类
    解决eclipse写jsp javaee时自动代码提示弹出过慢的问题
    第一篇博兼测试博之稍稍修改一下博客主题
  • 原文地址:https://www.cnblogs.com/mqingqing123/p/1954144.html
Copyright © 2020-2023  润新知