第一中:
引用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>