如何使用jquery将ifm中的mousemove事件发送回父级? [英] How do you send a mousemove event from an iframe back to the parent using jquery?

查看:106
本文介绍了如何使用jquery将ifm中的mousemove事件发送回父级?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用jquery,我如何将iframe的窗口mousemove事件发送回其父级,并且父级将看到事件的鼠标坐标映射到它自己的窗口? iframe和父级都位于同一个域中。

Using jquery, how would I send an iframe's window mousemove events back to its parent, and the parent will see the event with the mouse coordinates mapped to it's own window? Both the iframe and parent are on the same domain.

推荐答案

我通过将iframe与绝对定位的透明div重叠来解决了这个问题。这样,父级总是获取mousemove事件。

I solved this problem by overlaying the iframe with an absolutely positioned transparent div. This way, the parent always gets the mousemove events.

这篇关于如何使用jquery将ifm中的mousemove事件发送回父级?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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