开发者

Is it possible to catch mouse position outside the document?

开发者 https://www.devze.com 2022-12-20 08:05 出处:网络
I found that is possible to retrieve the mouse position in IE outside the document or even the browser window, by us开发者_运维知识库ing \"window.onblur\" or \"window.onfocusout\" or something like th

I found that is possible to retrieve the mouse position in IE outside the document or even the browser window, by us开发者_运维知识库ing "window.onblur" or "window.onfocusout" or something like that.

Even in Firefox it gives you negative mouse coordinates in the onmouseout event handler if you let your mouse pointer go out of the viewport quickly.

Can there be done more in Firefox, something that gets close to the aforementioned IE behaviour?


One method would be to write a java applet that is actually executed on the user-side. Then using java controls track the mouse position any where on the user screen.


No. Unless the user is continuing a drag motion from within the window, you can't get mouse movement events when the mouse is outside the window with Firefox. I don't know of any hacks to get around this limitation.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号