重新加载页面以添加内容

Reloaded page to have added content

本文关键字:添加 新加载 加载      更新时间:2023-09-26

在我的页面上,我有以下代码:

<script type="text/javascript">
            if(!window.opener) {
                window.open(window.location.href, '_blank');
            }
        </script>

基本上在新窗口中打开"自身",没有常量循环。
如何将"其他"Javascript内容添加到它打开的新窗口中,而不是原始窗口?

<script type="text/javascript">
    if(!window.opener) {
        window.open(window.location.href, '_blank');
    } else {
        // ...add additional content here...
    }
</script>