https://www.cnblogs.com/userzf/p/9448646.html
http://www.fly63.com/article/detial/5923
https://www.cnblogs.com/zhengchenhui/p/6038865.html
https://blog.csdn.net/qq_19642453/article/details/89036006
详解layui弹窗父子窗口之间传参数的方法
https://www.jb51.net/article/133014.htm
layui 弹出层中显示table 表格
https://blog.csdn.net/zyg1515330502/article/details/98209448
https://blog.csdn.net/withoutBugs/article/details/85005699
https://blog.csdn.net/flybridy/article/details/78610737
https://blog.csdn.net/baidu_38715224/article/details/90767061
父页面代码
var index = layer.open({
type: 2,
title: '编辑用户',
content: '/userUpdate',
area: ['100%', '100%'],
success: function(layero, index){
var iframe = window['layui-layer-iframe'+index];
//调用子页面的全局函数
iframe.child(需要往子页面传的值)
}
});
-
以上代码相信大家的都可以看的懂,这里主要是success里的代码.好多人出错就出错在第二步.
child是你的子页面的全局函数,一定不要忘记
.好多人都出现iframe.child is not a function
就是这个原因导致的 -
子页面代码,这里注意child一定要是全局函数
function child(data) {
console.log(data)
}