function GetQueryString(name) {var reg = new RegExp("(^|&)" + name + "=(*)(&|$)", "i");var r = window.location.search.substr(1).match(reg); //获取url中"?"符后的字符串并正则匹配var context = "";if (r != null)//context = decodeURIComponent(r);context = r;reg = null;r = null;return context == null || context == "" || context == "undefined" ? "" : context;}//alert(GetQueryString("viewlet"))const baseUrl = window.location.origin+window.location.pathname+"?viewlet=";const baseDir = GetQueryString("viewlet").replace(/%252F/g, '/').substring(0,GetQueryString("viewlet").replace(/%252F/g, '/').indexOf("/")+1);const jumpFile = "jsc/jsc_home_mon_agent.cpt" ;//变量const basePara = "&op=view"+"&agent=" + a ;const targetUrl = baseUrl+baseDir+jumpFile+basePara;//窗体var $iframe = $("//将窗体的src属性设置为模板路径$iframe.attr("src", targetUrl);//窗体的属性var o = { title: "代理人明细", //标题 destroyOnClose:true, // 是否在关闭对话框的时候将对话框从dom中移除 width: 580, //宽度 height: 290, //高度 //、、background: "blue", //closable:true, //是否显示关闭按钮,默认true //confirm:true, //是否添加确认取消按钮,默认false //draggable:true //是否可拖动,默认true};//弹出窗体window.parent.FR.showDialog(o.title, o.width, o.height, $iframe, o);