zoukankan      html  css  js  c++  java
  • iframe和选项卡面板切换

    <div class="col-sm-6">
        <div class="tabs-container">
            <ul class="nav nav-tabs" >
                <li class="active"><a href="__URL__/material/id/{$vo.id}/type/1"  class="J_subItem" target="ajax" rel="materiallist"><span>切换1</span></a></li>
                <li><a href="__URL__/material/id/{$vo.id}/type/2" target="ajax" class="J_subItem" rel="materiallist"><span>切换2</span></a></li>
                <li><a href="__URL__/material/id/{$vo.id}/type/3" target="ajax" class="J_subItem" rel="materiallist"><span>切换3</span></a></li>
                <li><a href="__URL__/material/id/{$vo.id}/type/4" target="ajax" class="J_subItem" rel="materiallist"><span>切换4</span></a></li>
            </ul>
    
            加载页面
            <div class="tab-content tab-pane active panel-body">
                <iframe class="J_iframe" id="J_subItem" width="100%" height="100%" src="__URL__/material" frameborder="0"></iframe>
            </div>
        </div>
    </div>
    
    <script>
        function subItem1()
        {
            var target = $('#J_subItem');
            var url =$(this).attr('href');    
            target.attr('src', url).load(function () {    
            });
            $(this).parent().parent().children("li").removeClass("active"); 
            $(this).parent().addClass("active");
            return false;
        }
        $('.J_subItem').on('click', subItem);
    </script>   

    效果差不多这样的了:

      

    别忘了 bootstrap的css 和 jquery

    作者地址:https://www.cnblogs.com/G921123/
    创作也有乐趣 知识分享 转载注明出处 相互理解 谢谢! WeChat:17321295203
  • 相关阅读:
    jmeter参数化文件路径问题
    kafka在linux下安装
    性能测试案例:Oracle重复的SQL
    Elastic:菜鸟上手指南
    python推导式特殊用法
    python动态参数
    python 循环控制
    python 代码执行顺序
    Python eval() 函数
    if __name__ == '__main__': 详解
  • 原文地址:https://www.cnblogs.com/G921123/p/10419801.html
Copyright © 2011-2022 走看看