Detect mousemove when over an iframe?

后端 未结 11 575
Happy的楠姐
Happy的楠姐 2020-11-29 05:47

I have an iframe that takes up the entire window (100% wide, 100% high), and I need the main window to be able to detect when the mouse has been moved.

Already tried

11条回答
  •  Happy的楠姐
    2020-11-29 06:20

    The page inside your iframe is a complete document. It will consume all events and have no immediate connection to it's parent document.

    You will need to catch the mouse events from javascript inside the child document and then pass this somehow to the parent.

提交回复
热议问题