簡體   English   中英

從iframe中打開iframe fancybox,以便在父級中打開

[英]open iframe fancybox from within an iframe so that it opens in the parent

我可以使它工作,從而在iframe中打開fancybox IMAGE

<a href="javascript:parent.$.fancybox.open({href : 'myurl'});">Open something</a>

我遇到的問題是我需要打開一個fancybox IFRAME。 示例代碼或任何想法將不勝感激。

謝謝

只需設置iframe類型:

<a href="javascript:parent.$.fancybox.open({href : 'myurl', type: 'iframe'});">Open something in iframe</a>

但是,只有在需要其他選項時才應該這樣做,因為可以使用iframe打開其他頁面,例如:

<a href="myurl">Open something in iframe</a>

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM