zoukankan      html  css  js  c++  java
  • jquery tab 点击后加载

    前台 js 改成:

                $(function () {       

                $("ul.tabs").tabs("div.panes > div");
                $("ul.tabs a").click(function(){ // 点击后才加载
                    var index = $("ul.tabs a").index(this);
                    var content = $("div.panes div").eq(index);
                    if (content.find("iframe:first").attr("src") == "") {
                        content.find("iframe:first").attr("src", content.find("input[type=hidden]:first").val());
                    }
                });

            });    

    C#:

                StringBuilder str_tabs = new StringBuilder();
                str_tabs.Append("<div class='panes'>");
                for (int i = 0; i < DS.Rows.Count; i++)
                {
                    if (i == 0// 第一次默认加载
                    {
                        str_tabs.Append("<div>");
                        str_tabs.Append("<iframe  name='fraChart' src='ChartForm.aspx?Type=" + ChartFormType + "&FormUrl=" + DS.Rows[i]["FormUrl"].ToString() + "'  frameborder='0' style='100%;height:100%;border:1px solid #aaa ;' scrolling='auto' height='100%'></iframe>");
                        str_tabs.Append("</div>");
                        continue;
                    }
                    str_tabs.Append("<div>");
                    str_tabs.Append("<input type='hidden' value='ChartForm.aspx?Type=" + ChartFormType + "&FormUrl=" + DS.Rows[i]["FormUrl"].ToString() + "' />");
                    str_tabs.Append("<iframe  name='fraChart'  src=''  frameborder='0' style='100%;height:100%;border:1px solid #aaa ;' scrolling='auto' height='100%'></iframe>");
                    str_tabs.Append("</div>");
                }

                str_tabs.Append("</div>"); 

  • 相关阅读:
    7大python 深度学习框架的描述及优缺点绍
    nodejs 和 js
    python操redis
    python ConfigParser 的小技巧
    RHEL 7.3修改网卡命名规则为ethX
    redhat7.3配置163 yum源
    分区脚本(fdisk)
    linux之sed用法
    linux awk命令详解
    Python 装饰器学习
  • 原文地址:https://www.cnblogs.com/zlfucku/p/2395606.html
Copyright © 2011-2022 走看看