How do you send a mousemove event from an iframe back to the parent using jquery?

二次信任 提交于 2019-12-12 04:09:34

问题


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.


回答1:


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



来源:https://stackoverflow.com/questions/9608474/how-do-you-send-a-mousemove-event-from-an-iframe-back-to-the-parent-using-jquery

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!