在新窗口中打开 iframe 内的链接 [英] Make links inside an iframe open in a new window

查看:31
本文介绍了在新窗口中打开 iframe 内的链接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在 iframe 中显示一张地图,该地图有一个指针,鼠标悬停时会显示有关某个公司的一些信息,问题是一旦您单击该链接,该页面就会在 iframe 内打开,这会破坏体验,所以我想知道是否可以在新窗口中打开 iframe 内的链接,而不是使用 jquery 或类似的东西?

I'm trying to display an map inside an iframe that has a needle which on mouseover shows some information about a certain company, the thing is once you click the link the page opens up inside the iframe which ruins the experience, so i was wondering is it possible to make the links inside an iframe open up in a new window instead perhaps using jquery or something similiar?

我有 atm 的代码是

the code i have atm is

http://www.jsfiddle.net/rkd59/1/

在 iframe 中至少捕获一次点击,以便我可以调整 iframe 的大小

the very least capture a click within the iframe so i might resize the iframe

推荐答案

您需要某种开放的 API 才能正确执行此操作,并且 Eniro 未根据 此页面(瑞典语)提供).

You will need some kind of open API to do this properly, and Eniro doesn't provide one according to this page (in Swedish).

我建议您改用 Google Maps API v3.我在 jsFiddle 上制作了一个 示例,看起来与此类似埃尼罗.

I would recommend you to use the Google Maps API v3 instead. I've made an example on jsFiddle that looks similar to that of Eniro.

我很乐意为您提供更多帮助,所以尽管问吧!

I'll gladly give you more help with this, so just ask away!

这篇关于在新窗口中打开 iframe 内的链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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