简体   繁体   English

如何使用jquery将mousemove事件从iframe发送回父级?

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

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? 使用jquery,我如何将iframe的窗口mousemove事件发送回其父级,并且父级将看到具有映射到其自身窗口的鼠标坐标的事件? Both the iframe and parent are on the same domain. iframe和父项都在同一个域中。

I solved this problem by overlaying the iframe with an absolutely positioned transparent div. 我通过用绝对定位的透明div覆盖iframe来解决了此问题。 This way, the parent always gets the mousemove events. 这样,父级始终会获得mousemove事件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何使用jquery从内部滚动iframe? - How do you scroll an iframe from within using jquery? 如何将选定的数据从模式弹出窗口发送回父表单并关闭模式 - How do you send selected data back from modal popup to parent form and close modal Fancybox(jQuery)-将信息从父级传递到iframe,然后将iframe传递回父级 - Fancybox (jQuery) - Passing information from parent to iframe and iframe back to parent 您如何模拟拖动事件(单击一个按钮即可删除)? - How do you simulate a drag event (mousemove with a button clicked)? iframe阻止mousemove事件的发生 - Iframe obstructing the mousemove event from occuring 如何从父页面捕获url参数并使用Javascript发送到iframe? - How do I capture a url parameter from parent page and send to an iframe using Javascript? 如何重新启动事件mousemove jquery? - How to restart event mousemove jquery? 如何使用jQuery在父窗口中从iframe访问数据? - How do I access the data from iframe in the parent window using jQuery? 我如何引用的文档对象 <iframe> 从父页面,使用jQuery? - How do I refer to the document object of an <iframe> from the parent page, using jQuery? 使用Jquery或Javascript触发mousemove事件 - Trigger mousemove event using Jquery or Javascript
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM