所以我必须检查4个方面,如果我想限制鼠标在窗口中采取行动,如
$(document).on('mousemove',function(e){
if (e.pageX > 10 && e.pageX<$(window).width-10 && e.pageY< $(window).height()-10&& e.pageY >10){
//are there any better way?
}
});发布于 2012-12-02 22:32:12
最好的方法可能是挂接到mouseout事件中。请尝试使用document.body或类似的工具。
https://stackoverflow.com/questions/13670180
复制相似问题