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>

posted @ 2011-06-16 22:55  ゞ追忆o0ゞ  阅读(5232)  评论(0编辑  收藏  举报