码迷,mamicode.com
首页 > 其他好文 > 详细

layer弹窗的跳转功能

时间:2017-07-12 10:25:47      阅读:591      评论:0      收藏:0      [点我收藏+]

标签:parent   als   关闭   ram   location   rip   sage   cat   reload   

1,本弹窗直接跳转父页面:

1   @if(session(‘message‘))
2 
3     <script>
4         window.parent.location.reload(); //刷新父页面
5         var index = parent.layer.getFrameIndex(window.name); //获取窗口索引
6         parent.layer.close(index);  // 关闭layer
7     </script>
8     @endif

2,点击关闭弹窗后刷新当前页面:

只需在弹窗运行后添加

end: function(){
//任何对父类页面操作
}
 1  layer.open({
 2                 type: 2,
 3                 area: [w+‘px‘, h +‘px‘],
 4                 fix: false, //不固定
 5                 maxmin: true,
 6                 shade:0.4,
 7                 title: title,
 8                 content: url,
 9                 end: function(){
10                     window.parent.location.reload(); //刷新父页面
11                 }
12             });

 




layer弹窗的跳转功能

标签:parent   als   关闭   ram   location   rip   sage   cat   reload   

原文地址:http://www.cnblogs.com/wanlibingfeng/p/7153620.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!