挑战:从iframe内部调用父Javascript函数?

编程入门 行业动态 更新时间:2024-10-07 06:49:20
本文介绍了挑战:从iframe内部调用父Javascript函数?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

嗨天才(或者是genii,或者是精灵) 挑战如上所述。我有一个带iframe的页面,并且 需要调用* parent *页面中的JS函数,*来自iframe内部的*。 (它适用于谷歌地图,但我不会厌烦你的复杂性, ,因为它不会影响这个问题)。 Mochas对能够解决这个问题的人表示赞赏。 Ta。

解决方案

Chris Ianson写道:

嗨天才(或者是genii,或者是精灵) 挑战如上所述。我有一个包含iframe的页面,并且需要在* parent *页面中调用JS函数,*来自iframe内部的*。 (这是Google的用途)地图,但我不会厌倦你的复杂性,因为它不会影响这个问题。 Mochas对任何能够解决这个问题的人都感到荣幸。

仍然鞭打iframe''死马''我明白了。 parent.yourfunction(); 不要尝试申请专利... - 保重, Jonathan ------------------- 小作品工作室 www.LittleWorksStudio

" Jonathan N.小" < LW ***** @ centralva>在消息中写道 news:44 ********************** @ news.centralva .. 仍在鞭打iframe''死马''我明白了。 :(由''死马''我认为你的意思''现在在所有 浏览器中完美运作''。 parent.yourfunction(); 遗憾的是,这似乎不适用于Google Maps API。是否还有其他 方法可以调用JS从父框架? 不要尝试为它申请专利...

太对了,我已经有足够的了。 .. TIA :)

Chris Ianson写道:

" Jonathan N. Little ; < LW ***** @ centralva>在消息中写道新闻:44 ********************** @ news.centralva ..

仍在鞭打iframe''死马''我明白了。

:(通过''死马''我认为你的意思''现在在所有人中完美地工作/> browsers''。

parent.yourfunction();

遗憾的是,这似乎不适用于Google Maps API。是否还有其他方法可以从父框架调用JS?

www.google/apis/maps/documentation/ Google Maps API文档 - 保重, Jonathan ------------------ - 小作品工作室 http://www.LittleWorksStudio。 com

Hi geniuses (or is that genii, or genies) The challenge is as above really. I have a page with an iframe in it, and need to call a JS function in the *parent* page, *from* inside the iframe. (It''s for Google Maps, but I won''t bore you with the complexities of that, as it doesn''t affect the question). Mochas kudos to anyone able to solve this widdle. Ta.

解决方案

Chris Ianson wrote:

Hi geniuses (or is that genii, or genies) The challenge is as above really. I have a page with an iframe in it, and need to call a JS function in the *parent* page, *from* inside the iframe. (It''s for Google Maps, but I won''t bore you with the complexities of that, as it doesn''t affect the question). Mochas kudos to anyone able to solve this widdle.

Still flogging the iframe ''dead horse'' I see. parent.yourfunction(); Don''t try patenting it though... -- Take care, Jonathan ------------------- LITTLE WORKS STUDIO www.LittleWorksStudio

"Jonathan N. Little" <lw*****@centralva> wrote in message news:44**********************@news.centralva.. .

Still flogging the iframe ''dead horse'' I see. :( By ''dead horse'' I assume you mean ''now working perfectly in all browsers''. parent.yourfunction(); Sadly this doesn''t seem to work for Google Maps API. Are there any other methods to call JS from the parent frame? Don''t try patenting it though...

Too right, I have enough of them already... TIA :)

Chris Ianson wrote:

"Jonathan N. Little" <lw*****@centralva> wrote in message news:44**********************@news.centralva.. .

Still flogging the iframe ''dead horse'' I see.

:( By ''dead horse'' I assume you mean ''now working perfectly in all browsers''.

parent.yourfunction();

Sadly this doesn''t seem to work for Google Maps API. Are there any other methods to call JS from the parent frame?

www.google/apis/maps/documentation/ Google Maps API Documentation -- Take care, Jonathan ------------------- LITTLE WORKS STUDIO www.LittleWorksStudio

更多推荐

挑战:从iframe内部调用父Javascript函数?

本文发布于:2023-11-30 18:41:58,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1651103.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:函数   iframe   Javascript

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!