2011-03-29 49 views

回答

0

使用jQuery,您可以訪問打開的窗口的屬性。

var newWind = window.open('http://<url_here>', 'childWindow') 

$j(newWind.document).find('html').addClass('opened-as-popup') 
+0

至少在FF4中使用FireBug。 – Jawa 2011-03-29 10:40:49

0

另一種解決方案:

var WindowObject = window.open(''); 
WindowObject.document.write('<body class="newClass">'); 
+0

使這個評論而不是答案 – robert 2011-03-31 05:19:28

相關問題