layui 弹出一个层 content里放的是一个页面,在页面关闭的时候获得页面中的内容,更新到主页面
layer.open({
type: 2,
area:['1000px','500px'],
title:'添加子项',
content:"childTestItem.html",
btn: ['保存'],
yes: function(index, layero){
//获得弹出层iframe
var res = window["layui-layer-iframe" + index];
//获得iframe,我使用的非模块化直接可以获得iframe中的table
console.log(res.layui.table);
//layer.close(index); //关闭
}
});