我想知道是否有其他人有此問題。Google+分享 - 無法定位到iframe - 獲取錯誤:「此內容無法顯示在框架中」
我想將google +共享網址定位到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>
在Internet Explorer中的iframe顯示錯誤「此內容不能顯示在框架......」等
在Firefox中,沒有錯誤,並且iframe是空的!
有什麼辦法,我可以將目標網址到IE中的iframe而不會出現此錯誤?
任何幫助,將不勝感激。
嗨珍妮,感謝您的答覆。非常感謝。 :-) – 2012-04-27 07:57:36