«

layui父级操作iframe内的对象

emer 发布于 2018-7-19 15:31   2692 次阅读     


 function show_layer(){
layer.open({
        type: 2,
        area: [w+'px', h +'px'],
        fix: false, //不固定
        maxmin: true,
        shadeClose: true,
        shade:0.4,
        title: title,
        content: url,  //url 为子布局的url路径
        success:function (layero,index) {

                var iframe = window['layui-layer-iframe' + index];
              //iframe是子级的document对象
        }
    });
}