3

子ウィンドウにサードパーティの Web サイトをポップアップ表示します。親ウィンドウから DOM オブジェクトを参照できますか? これどうやってするの?

4

2 に答える 2

0

簡単な答え:

SOP期間に違反することはできません。

抜け穴は、少なくともプロパティのリクエストが同じオリジンを通じて行われているparent.parentスキームを使用しています。

コンテンツに基づいて iframe のサイズを変更する

于 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 に答える