zoukankan      html  css  js  c++  java
  • 添加多个tab,并循环修改tab样式

     <div class="con">
            <ul id="tags">
                <li class="selectTag"><a onclick="selectTag('tagContent0',this)" href="default.aspx"
                    target="repfrm">第一周 </a></li>
                <li><a onclick="selectTag('tagContent1',this)" href="OverrideToString.aspx" target="repfrm">
                    第二周</a> </li>
                <li><a onclick="selectTag('tagContent2',this)" href="CreateTextBoxList.aspx" target="repfrm">
                    第三周</a> </li>
                <li><a onclick="selectTag('tagContent3',this)" href="PromptDialogBox1.aspx" target="repfrm">
                    第四周</a> </li>
                <li><a onclick="selectTag('tagContent4',this)" href="ShowFlash.aspx" target="repfrm">
                    第五周</a> </li>
                <li><a onclick="selectTag('tagContent5',this)" href="testDoubleY.aspx" target="repfrm">
                    第六周</a> </li>
            </ul>

            <script type="text/javascript">
                function selectTag(showContent, selfObj) {
                    // 操作标签
                    var tag = document.getElementById("tags").getElementsByTagName("li");
                    var taglength = tag.length;
                    for (i = 0; i < taglength; i++) {
                        tag[i].className = "";
                    }
                    selfObj.parentNode.className = "selectTag";
                }
            </script>

            <div id="tagContent" style="height: 695px">
                <div class="tagContent selectTag">
                    <iframe id="repfrm" width="100%" name="repfrm" height="100%"
                        scrolling="no" src="default.aspx" frameborder="0"></iframe>
                </div>
            </div>
        </div>

  • 相关阅读:
    微信开发第一步—接入指南
    摸不着
    dubbo监控中心安装部署
    解决mapper映射文件不发布问题
    单例设计模式
    Spring与Hibernate集成、Spring与Struts2集成
    Spring MVC对日期处理的不友好问题
    常用的系统存储过程
    这就是成长(刚开始经常犯的错误随记)
    一些简单的查询
  • 原文地址:https://www.cnblogs.com/lingxzg/p/2147689.html
Copyright © 2011-2022 走看看