我在子窗口中弹出了第 3 方网站。我可以从父窗口引用它的 DOM 对象吗?我怎样才能做到这一点?
问问题
756 次
2 回答
0
于 2012-11-29T18:45:41.387 回答
0
childWindow = window.open ("http://www.yourDomain.com","mywindow");
childWindow.onload = function () {
childDocument = childWindow.document;
// now you can do things like, childDocument.getElementById("someElement"); and other DOM manipulation.
};
于 2012-11-29T18:48:14.057 回答