[英]Loading external website in popup window using Colorbox
在官方網站http://www.jacklmoore.com/colorbox/example2/提供的示例中
該網站http://threadless.com在彈出窗口中成功打開。
我成功實現了此示例,但是無法加載任何其他頁面。
例如
<link rel="stylesheet" href="colorbox.css" />
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script src="jquery.colorbox.js"></script>
<script>
$(document).ready(function(){
$(".iframe").colorbox({iframe:true, width:"80%", height:"80%"});
});
</script>
<body>
<p><a class='iframe' href="http://threadless.com">Outside Webpage (Iframe)</a></p>
</body>
該代碼可以正常工作,但是當我用google.com,facebook.com或任何其他網站替換threadless.com時,會出現一個空白彈出窗口。 有人可以幫我嗎?
非常感謝。
您可能會創建一個帶有google搜索框以及其他所需內容的簡單頁面,然后在iFrame中而不是google.com中打開它。
您是否希望搜索結果顯示在iFrame或新窗口中?
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.