JQuery 获取鼠标位置

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
    <link rel="stylesheet" type="text/css" href="Css/Commom.css" />
    <script src="Scripts/jquery-1.4.1.js" type="text/javascript"></script>
    <script language="javascript" type="text/javascript">
        $(function () {
            //e为事件名;
            $(document).mousemove(function (e) {
                $("p").text("X:" + e.pageX + "   Y:" + e.pageY);
            });

        });
    </script>
</head>
<body>
    <div class="column">
        <p>
        </p>
    </div>
</body>
</html>

上一篇:杨老师课堂之JavaScript悬浮事件(鼠标移入移出事件)


下一篇:Linux_开发工具