前端layer回调事件,成功,取消,关闭,关闭iframe

layer.open({
    
    
    type: 2,
    area: ['790px', '569px'],
    fixed: false, //不固定
    maxmin: true,
    offset: 'r',//靠右
    content: "/house/acs/thirdUser/page2.htm",
    success: function(layero){
    
    //成功 后回调方法
        layero.find('.layui-layer-min').remove(); //去掉最小化按钮
        layero.find('.layui-layer-max').remove(); //去掉最大化按钮
    },
    cancel: function(){
    
     //取消 后回调方法
        rowClone();
    },
    end: function(){
    
     //关闭 后回调方法
        
    }
});
//关闭iframe
var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
parent.layer.close(index); //再执行关闭

猜你喜欢

转载自blog.csdn.net/weixin_48860638/article/details/121751887