iframe中的目标框架(target =" _blank" not working) [英] target frame in iframe (target="_blank" not working)

查看:121
本文介绍了iframe中的目标框架(target =" _blank" not working)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个小问题。
我正在使用iframe插入横幅(包含指向外部网站的链接)。

I have a small problem. I'm using iframe to insert the banner (with link to the outside website).

<iframe src="http://wifi.tucado.com/ads/001.html" name="i001" target="_blank" frameset frameborder=0 id="i001" scrolling="no"></iframe>

我遇到的问题是当我点击框架内侧框架时它会打开一个页面内部框架我希望它在新窗口中打开它(或至少在父窗口中打开它)。
如果没有js或jquery,有没有办法做到这一点?
如果没有,我应该在jquery中做些什么来使它工作?我试图在这里找到答案,但发现了一些非常具体的问题,这些问题并没有直接面对我的问题。
感谢您的帮助。

The problem I have is when I click on the banner INSIDE the frame it opens a page INSIDE a frame and I want it to open it in new window (or at least in the parent one). Is there any way to do it without js or jquery? If not, what should I do in jquery to make it working? I was trying to find an answer here, but found just very specific questions which don't face my problem directly. Thanks for any help.

推荐答案

如果您可以控制iFrame中加载的源文件( http://wifi.tucado.com/ads/001.html ),尝试添加 target =_ top target =_ blank在那里的链接中。

If you can control the source file that is loaded inside the iFrame (http://wifi.tucado.com/ads/001.html), try adding a target="_top" or target="_blank" in the links there.

这篇关于iframe中的目标框架(target =&quot; _blank&quot; not working)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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