zoukankan      html  css  js  c++  java
  • 按钮点击跳转页面

    第一中:

    引用js

     <script src="/common/js/jquery-1.8.2.min.js" type="text/javascript"></script>
        <script src="/common/js/easyui/easyloader.js" type="text/javascript"></script>

    前台

    <asp:Button ID="btn" runat="server" Text="查看流程进度" CssClass="admin_cx marginleft" Height="25" OnClientClick="showAudit();return false;" />

    js (写在form标签结束前)

     <script type="text/javascript">
                function showAudit() {
                    var ids =<%=this.Request.QueryString["Id"]%>
                    parent.layer.open({
                        type: 2,
                        title: '流程进度',
                        maxmin: false,
                        shade: 0.4,
                        shadeClose: true, //点击遮罩关闭层
                        area: ['50%', '70%'],//content: 'PcPage/iframe/CounteriBid.aspx?psid=' + psid
                        content: ['/OA/Information/proAuditorList.aspx?Id=' + ids] //这里content是一个URL
                    });
                }
    
            </script>

    第二种(数据绑定控件里面)

    前台:

     <asp:TemplateField>
      <HeaderTemplate>操作</HeaderTemplate>
      <ItemStyle CssClass="text-center" />
       <ItemTemplate>
        <asp:LinkButton ID="lbtSum" runat="server" Text='[ 资金汇总 ]' OnClientClick='<%# BtnSummary(Convert.ToInt32(Eval("Id")))%>' Visible='<%# GetVisibles(Convert.ToInt32(Eval("State")))%>'></asp:LinkButton>
       </ItemTemplate>
      </asp:TemplateField>

    后台:

      public string BtnSummary(int x)
            {
                return "showAudit(" + x + ");return false;";
            }

    js(写在主页面form标签结束前)

     <script type="text/javascript">
                function showAudit(Id) {
                    parent.layer.open({
                        type: 2,
                        title: '流程进度',
                        maxmin: false,
                        shade: 0.4,
                        shadeClose: true, //点击遮罩关闭层
                        area: ['50%', '70%'],//content: 'PcPage/iframe/CounteriBid.aspx?psid=' + psid
                        content: ['/OA/Information/SumOfFunds.aspx?op=edit&Id=' + Id] //这里content是一个URL
                    });
                }
            </script>

    跳转页面操作做完功能关闭窗体(写(跳转)子页面的form标签结束前)

    <script type="text/javascript">
                function showMessage(msg) {
                    var fram = parent.getNowFrame();
                    $(fram).attr("src", $(fram).attr("src"));
    
                    parent.layer.msg(msg);
                    var index = parent.layer.getFrameIndex(window.name); //获取窗口索引
                    parent.layer.close(index);
                }
            </script>
  • 相关阅读:
    数据类型的总结
    typeof加括号和不加括号的区别
    排序
    数据类型分为哪两类
    css中需要更小的字体如何实现
    一些细节注意点
    数值转换题
    如何用分支结构计算年份
    Scout YYF I
    D. AND, OR and square sum
  • 原文地址:https://www.cnblogs.com/shanshuiYiCheng/p/9629366.html
Copyright © 2011-2022 走看看