子页面iframe如何调用 父页面的方法 或者对象(基于layui框架)

layui.use(... function(){
var _tools = {
func1: function(){
console.log('func1');
}
}
window.tools = _tools;
})


// 外部调用,如子页面
parent.tools.func1();

posted @ 2019-07-23 16:14  Hi!宋先生  阅读(2126)  评论(0编辑  收藏  举报