如何让EasyUI弹出层跳出框架

这个的解决方法其实挺简单的。

只要在最外面的框架页面加个div,然后用parent.div的id就可以的。但是必须得弹出框得是一个页面。

<div id="div_info"></div>

 

 

//外层弹出框1
 function openFirstWin(url, title, width, height) {
 var strWidth;
 var strHeight;
 if (width == null)
 strWidth = 800;
 else
 strWidth = width;
 if (height == null)
 strHeight = 500;
 else
 strHeight = height;
 if (url != null) {
 //var content = '<iframe name=\"first\" scrolling=\"auto\" frameborder=\"0\" src=\"' + url + '\" style=\"width:100%\;height:100%\;\"></iframe>';
 var content = createIFrame(url);
 parent.$('#div_info').window({
 close: false,
 modal: true,
 draggable: false,
 title: title,
 animate: true,
 content: content,
 minimizable: false,
 width: strWidth,
 height: strHeight,
 top: (parent.$(parent.window).height() - height) * 0.5,
 left: (parent.$(window).width() + 200 - strWidth) * 0.5
 });
 }
 return false;
 }

web技术分享

 

转载于:https://www.cnblogs.com/dotnetmvc/p/3908268.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值