我有以下代码
<div onmousemove="myFunction()">
<iframe src="www.someotherdomain.com"/>
</div>
当用户将鼠标移到iframe上时,我希望执行myFunction
。是否有可能将iframe上的事件冒泡到跨域方案中的父元素?我该怎么做?
PS: - 我无法使用
中提供的解决方案Iframe obstructing the mousemove event from occuring
或
How do you send a mousemove event from an iframe back to the parent using jquery?
因为我希望用户能够与iframe中的内容进行互动。