layer iframe 设置关闭按钮

版权声明:博客内容属于本人原创,转载请注明出处 https://blog.csdn.net/hl_qianduan/article/details/81070471
layer.open({
    type: 2,
    title: 'XXXX网吧历史更多数据',
    shade:0,
    // closeBtn:0,
    resize:false,
    move:false,
    shadeClose: true, //点击遮罩关闭层
    area : ['800px' , '600px'],
    content: '营业数据详情 更多数据.html'
    ,btn: [ '关闭']
    ,success: function(layero){
        layero.find('.layui-layer-btn').css('text-align','center');
    }

});

直接在layer.open中设置btn:['关闭],就有了关闭按钮,点击即关闭iframe页面

success: function(layero){ layero.find('.layui-layer-btn').css('text-align','center'); 

调整按钮居于中间底部

猜你喜欢

转载自blog.csdn.net/hl_qianduan/article/details/81070471