父页面获取子页面的值
$('iframe的id').contents().find(子页面的id).text();
子页面获取父页面的值
$("父页面id",window.parent.document).html();
父页面调用子页面的方法
document.getElementById('iframe的id').contentWindow.子页面的方法;
子页面调用父页面的方法
window.parent.父页面的方法;
父页面获取子页面的值
$('iframe的id').contents().find(子页面的id).text();
子页面获取父页面的值
$("父页面id",window.parent.document).html();
父页面调用子页面的方法
document.getElementById('iframe的id').contentWindow.子页面的方法;
子页面调用父页面的方法
window.parent.父页面的方法;
转载于:https://www.cnblogs.com/bilibiliganbei/p/6479034.html