- 由於iframe是異步加載的,因此先打開一個寬度爲0的彈框,加載iframe資源,緩存起來,再在打開新的彈窗
layer.open({
type: 2,
title: false,
closeBtn: 0, //不顯示關閉按鈕
shade: [0],
area: ['0px', '215px'],
offset: 'rb', //右下角彈出
content: ['userPopIframe.html', 'no'],
success: function (layero, index) {
layer.close(index)
},
end: function () { //此處用於演示
layer.open({
type: 2,
offset: 't',
scrollbar: false,
area: ['80%', '100%'],
title: '用戶管理',
maxmin: true,
content: ['userPopIframe.html', 'no'],
btn: ['保存', '取消'],
btn1: function () {
layer.closeAll();
},
btn2: function () {
layer.closeAll();
},
btnAlign: 'r',
});
}
})