| 
 | 
 
 
发表于 2018-12-13 22:17:16
|
显示全部楼层
 
 
 
- var windowapi;
 
 - try {
 
 -         windowapi = frameElement.api, W = windowapi.opener;
 
 - } catch (e) {
 
 - }
 
  
- if (typeof (windowapi) == 'undefined') {
 
 -                 $.dialog({
 
 -                         content : 'url:' + url,
 
 -                         zIndex : getzIndex(),
 
 -                         title : title,
 
 -                         lock : true,
 
 -                         width : width,
 
 -                         height : height,
 
 -                         left : '50%',
 
 -                         top : '50%',
 
 -                         opacity : 0.4,
 
 -                         button : [ {
 
 -                                 name : '确定',
 
 -                                 callback : clickcallbackChoose,
 
 -                                 focus : true
 
 -                         }, {
 
 -                                 name : '取消',
 
 -                                 callback : function() {
 
 -                                 }
 
 -                         } ]
 
 -                 });
 
 -         } else {
 
 -                 $.dialog({
 
 -                         content : 'url:' + url,
 
 -                         zIndex : getzIndex(),
 
 -                         title : title,
 
 -                         lock : true,
 
 -                         parent : windowapi, //原因在这里,if前是判断你当前页面有没有弹窗,如果没有弹窗那么就不需要给父级这个属性,如果有那么就走这个方法,这样这个弹框在关闭的时候就不会触发之前弹框的事件
 
 -                         width : width,
 
 -                         height : height,
 
 -                         left : '50%',
 
 -                         top : '50%',
 
 -                         opacity : 0.4,
 
 -                         button : [ {
 
 -                                 name : '确定',
 
 -                                 callback : clickcallbackChoose,
 
 -                                 focus : true
 
 -                         }, {
 
 -                                 name : '取消',
 
 -                                 callback : function() {
 
 -                                 }
 
 -                         } ]
 
 -                 });
 
 -         }
 
  复制代码 |   
 
 
 
 |