0
我有以下代碼,試圖檢索新打開的窗口的URL。無法檢索window.location.href
<script type="text/javascript">
this.windowRef = window.open("http://www.google.com");
console.log(this.windowRef.location.href);
</script>
然而,當我看到瀏覽器的控制檯,顯示的結果是:「關於:空白」,而不是「www.google.com」
這是爲什麼?我如何顯示www.google.com?
感謝您的幫助。