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>"); 

  • 相关阅读:
    ssh port forwarding
    Anaconda2
    Xenomai 3 migration
    Xenomai for Debian Jessie
    debian jessie install note
    ubuntu 安装时遇到 hash sum mismatch 处理方法
    Rate Monotonic Scheduling algorithm
    rtems 4.11 部分m4文件分析
    [模仿]html5游戏_兔子踩铃铛
    [模仿]html5游戏_2048
  • 原文地址:https://www.cnblogs.com/zlfucku/p/2395606.html
Copyright © 2011-2022 走看看