开发者

Javascript, GWT

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜