How do you send a mousemove event from an iframe b

2019-09-08 05: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.