优美短文

jquery 获取鼠标位置

    //获取鼠标位置
    $(function(){
        $('body').mousemove(function(e) {
            e = e || window.event;
            __xx = e.pageX || e.clientX + document.body.scroolLeft;
            __yy = e.pageY || e.clientY + document.body.scrollTop;
        });
    });

 

posted @ 2016-07-01 14:23  一根PHP  阅读(13880)  评论(0编辑  收藏  举报