获取父窗口iframe方法

在页面中,有个iframe,基于这个iframe,弹出了个窗口,这个窗口在关闭的时候需要操作iframe里的元素。

做法是

window.top.document.getElementById("_view_user_index_").contentWindow.document.getElementById("Score").value = $("#txt_Deductible").val();

这里的_view_user_index_是iframe的id,Score是父窗口中的一个元素,txt_Deductible这个元素是弹出层里的元素

原文地址:https://www.cnblogs.com/Rexcnblog/p/6818146.html