从iframe中打开iframe fancybox,以便在父级中打开 [英] open iframe fancybox from within an iframe so that it opens in the parent

查看:121
本文介绍了从iframe中打开iframe fancybox,以便在父级中打开的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可以让这个工作从iframe中打开一个fancybox IMAGE

I can get this to work which opens a fancybox IMAGE from within an iframe

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

我遇到的问题是我需要打开一个fancybox IFRAME。示例代码或任何想法将不胜感激。

Problem I have is that I need to open a fancybox IFRAME. Example code or any ideas would be greatly appreciated.

谢谢

推荐答案

只需设置类型 iframe

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

但是只有当你需要有不同的选项时才应该这样做,因为你可以打开其他页面iframe如:

But you should do it only when you need to have different options, because you can open other page withing iframe like:

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

这篇关于从iframe中打开iframe fancybox,以便在父级中打开的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆