iframe 在 Firefox 和 Google Chrome 中都显示为空白

iframes appearing blank in both Firefox and Google Chrome

我正在尝试在我的网站中实施 Google 群组,但显示为空白。我知道我的浏览器受支持,因为我可以查看其他嵌入的 Google 组。

<iframe id="forum_embed"
src="javascript:void(0)"
scrolling="no"
width="900"
height="700">
</iframe>
<script type="text/javascript">
document.getElementById('forum_embed').src =
 'https://groups.google.com/forum/embed/?place=forum/artemis-moonlight'
 + '&showsearch=true&showpopout=true&showtabs=false'
 + '&parenturl=' + encodeURIComponent(window.location.href);
</script> 

这是我正在使用的代码,直接来自 Google 网上论坛站点,但无论网络浏览器如何,我得到的只是... http://puu.sh/lq4ZZ/85db1278b5.png

这是一个使用您的确切代码的 jsFiddle,它正在运行,所以我不确定会发生什么。

也许您可能需要查看一些 .htaccess 问题或您的主机上可能存在的其他服务器限制

html

   <iframe id="forum_embed"
    src="javascript:void(0)" scrolling="no" width="900" height="700">
    </iframe>

js

    document.getElementById('forum_embed').src =
 'https://groups.google.com/forum/embed/?place=forum/artemis-moonlight'
 + '&showsearch=true&showpopout=true&showtabs=false'
 + '&parenturl=' + encodeURIComponent(window.location.href);  

https://jsfiddle.net/happymacarts/6sh1edmf/