Share 谷歌+;共享-无法以iframe为目标-获取错误:";此内容不能在框架中显示";

Share 谷歌+;共享-无法以iframe为目标-获取错误:";此内容不能在框架中显示";,share,google-plus,Share,Google Plus,我想知道是否还有其他人有这个问题 我想将google+共享url定位到iframe,而不是打开一个新窗口 以下是我正在使用的测试代码: <?php $url = "https://plus.google.com/share?url=http%3A%2F%2Feu.arithon.com%2Frss%2Fjobdetails.php%3Fclient_user_id%3Darithon_1348%26jobs_id%3D10000"; ?> <!DOCTYPE html>

我想知道是否还有其他人有这个问题

我想将google+共享url定位到iframe,而不是打开一个新窗口

以下是我正在使用的测试代码:

<?php
$url = "https://plus.google.com/share?url=http%3A%2F%2Feu.arithon.com%2Frss%2Fjobdetails.php%3Fclient_user_id%3Darithon_1348%26jobs_id%3D10000";
?>
<!DOCTYPE html>
<html>
<head>
</head>
<body>

    <div>
        <iframe src = "<?php echo $url ?>" frameborder=no width=600 height=300></iframe>
    </div>

    <script type="text/javascript">
        function openShareWindow()
        {   
            url =  "<?php echo $url ?>";
            window.open(url, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=400,width=600');
            return false;       
        }
    </script>

    <a href="javascript:void()" onclick="openShareWindow();">
        <img src="http://eu.arithon.com/new_arithonASP/new_images/arithon_post.jpg" alt="Share on Google+"/>
    </a>

</body>
</html>


共享URL设计用于打开新窗口,而不是在iframe中打开,因此这样使用它将不起作用。

共享URL设计用于打开新窗口,而不是在iframe中打开,因此这样使用它将不起作用。

当您使用
时,你在IE中的成绩取决于你的来源。换句话说,有些来源会起作用,有些来源会造成这个问题。如果您在IE中收到错误消息,“此内容不能显示在框架中。为了帮助保护您输入此网站的信息的安全,此内容的发布者不允许将其显示在框架中,”请尝试以下操作:

security=“restricted”
添加到您的标签:

我在尝试加入Blogspot/Blogger博客时遇到了完全相同的问题。添加
security=“restricted”
属性后,问题消失了

以下是Microsoft提供的文档:

当您使用
时,IE中的结果可能取决于您使用的源代码。换句话说,有些来源会起作用,有些来源会造成这个问题。如果您在IE中收到错误消息,“此内容不能显示在框架中。为了帮助保护您输入此网站的信息的安全,此内容的发布者不允许将其显示在框架中,”请尝试以下操作:

security=“restricted”
添加到您的标签:

我在尝试加入Blogspot/Blogger博客时遇到了完全相同的问题。添加
security=“restricted”
属性后,问题消失了

以下是Microsoft提供的文档: