<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>JQ获得鼠标位置</title>
<script type="text/javascript" src="http://keleyi.com/keleyi/pmedia/jquery/jquery-1.10.2.min.js"></script>
</head>
<body>
<a href="http://keleyi.com/a/bjac/8p1g5yeq.htm" target="_blank">原文</a>
<div id="mousePosition_keleyi_com" style="border:1px solid silver;width:219px;height:23px"></div>
<script type="text/javascript">
$(document).mousemove(function (e) {
var xy_keleyi_com="x坐标:"+ e.pageX+",y坐标:"+ e.pageY;
$("#mousePosition_keleyi_com").text(xy_keleyi_com);
})
</script>
</body>
</html>
JQ获得鼠标位置
最新推荐文章于 2022-08-31 11:19:47 发布