开发者

Javascript, GWT

开发者 https://www.devze.com 2023-03-16 23:28 出处:网络
I have a hidden component that will be shown only if a mou开发者_运维问答se pointer is in some area (not necessary on top of the hidden component).Therefore, I am interested in catching all mouse move

I have a hidden component that will be shown only if a mou开发者_运维问答se pointer is in some area (not necessary on top of the hidden component). Therefore, I am interested in catching all mouse move event from the browser. Is it posible with GWT, GXT, or with Javascript?

Thanks


Yes it is possible to detect mouse events.

For example if you are using jQuery:

    $(document).mousemove(function(event){

       var mouseX = event.clientX;
       var mouseY = event.clientY;

       //do something with the X and Y values

    });

Demo: http://jsfiddle.net/maniator/xqULX/

0

精彩评论

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