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();
            }

        });
原文地址:https://www.cnblogs.com/kennyliu/p/5129996.html