Layer弹出层关闭后刷新父页面

API地址:http://layer.layui.com/api.html#end

调用END回调方法:

end - 层销毁后触发的回调

类型:Function,默认:null

无论是确认还是取消,只要层被销毁了,end都会执行,不携带任何参数。

   function updateStock(id) {
        //iframe层
        parent.layer.open({
            type: 2,
            title: ‘修改‘,
            shadeClose: false, //点击遮罩关闭
            shade: 0.8,
            area: [‘30%‘, ‘45%‘],
            maxmin: true,
            closeBtn: 1,
            content: [‘/BusinessActivity/CheckStock/LayerUpdateStock?id=‘ + id, ‘yes‘], //iframe的url,yes是否有滚动条
            //yes: function (index, layero) {
            //    alert(index);
            //    alert(layero);
            //},
            end: function () {
                location.reload();
            }

        });
时间: 2024-08-01 22:41:58

Layer弹出层关闭后刷新父页面的相关文章

【已解决】artDialog在iframe窗口中关闭弹出窗口返回并刷新父页面

在父页面弹出窗口中,添加回调函数,当close时调用,直接上代码: art.dialog.open(url, {         lock : true,         title : text,         width : '800px',         height : '500px',         close : function () {              art.dialog.open.origin.location.href="url1";       

微信子页面关闭后刷新父页面

前段时间开发微信公众号时,需要用到从编辑页面点击保存后,跳转到列表页面后并刷新,网上找了好多 function f_close(){ if(typeof(WeixinJSBridge)!="undefined"){ //WeixinJSBridge.call('closeWindow'); history.go(-1); }else{ if (navigator.userAgent.indexOf("MSIE") > 0) { if (navigator.us

js window.open()打开的页面关闭后刷新父页面

function test(){ var winObj = window.open(URL); var loop = setInterval(function(){ if(winObj.closed){ clearInterval(loop); parent.location.reload(); } },1); }

关闭layer弹出层,刷新父窗口 - 官方没有说这个, 但是很有用。

关闭layer弹出层,刷新父窗口,火狐提示:NS_ERROR_XPC_SECURITY_MANAGER_V错误 原代码如 下: window.parent.location.reload(); //window.parent.location.href="/file/list" var index = parent.layer.getFrameIndex(window.name); parent.layer.close(index); 解决方案: 利用end函数 layer.open(

layer弹出层的关闭问题

就是在执行添加或修改的时候,需要将数据提交到后台进行处理,这时候添加成功之后最理想的状态是关闭弹出层并且刷新列表的数据信息,之前一直想实现这样,可一直没有成功,今天决定好好弄一弄,在仔细看过layer的帮助手册以及查阅资料之后,有了以下的解决办法: 一.关闭弹出窗 这是layer官网给出的帮助手册,讲解的比较详细 分成两种情况: 1.弹出层不是新的页面的时候,直接获得该弹窗的索引,然后执行close方法 layer.close(); 2.弹出窗是新的页面的时候 var index=parent.

layer弹出层设置相对父级元素定位

layer弹出层默认是相对body固定定位的,可是项目中一般需要相对某个盒子相对定位,下面是个加载弹层例子: var loadIndex = layer.open({ type: 3, //3 表示加载 fixed: false, //取消固定定位,因为固定定位是相对body的 offset: ['60px', '132px'], //相对定位 time: 5000, //定时关闭弹层 icon: 2, //加载的icon类型 shade: 'background-color: rgba(0,0

asp.net中获取Layer弹出层返回值

1.MainPage.aspx中点击按钮利用Layer弹出层,代码如下: <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="MainPage.aspx.cs" Inherits="demo.MainPage" %> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xh

常用的layer弹出层

本文来自 松耦合 的CSDN 博客 ,全文地址请点击:https://blog.csdn.net/dunegao/article/details/78978448?utm_source=copy 常用的layer弹出层 1.提示信息 layer.msg("格式不正确") 2.loading加载层 var loading_img = layer.load(1, { shade: [0.1,'#fff'] //0.1透明度的白色背景 }); //数据调取完毕时使用 layer.close(

子页面提交后刷新父页面问题

在弹出的子页面在做新增和修改操作时, 有时要对父页面进行刷新操作, 可以关闭子页面后刷新父页面, 也可以不关闭子页面刷新父页面,在网上查到了方法, 在这里记一下,方便以后的学习查找. 一. 弹出子页面关闭刷新父页面: 在父页面js中回调window.opener.location.reload(); <script language=JavaScript> window.opener.location.reload(); </script> 二. 不关闭子页面刷新父页面: 在子页面