首页 > 移动平台 > 详细

jquery获取鼠标移动时的位置

时间:2020-02-21 13:47:04      阅读:79      评论:0      收藏:0      [点我收藏+]
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>jquery获取鼠标的位置</title>
<meta name="author" content="DeathGhost" />
<style>
    
    
</style>
<script src="jquery.js"></script> 
<script src="get.js"></script> 
</head>
    <body style="width:1000px;height:1000px">
        
    </body>
</html>

get.js:

$(function(){
        $("body").mousemove(function(e){
            console.info("x :" + e.pageX);
            console.info("y :" + e.pageY);
        });
});

 

效果:技术分享图片

 

jquery获取鼠标移动时的位置

原文:https://www.cnblogs.com/1998xujinren/p/12340957.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!