<!DOCTYPE html PUBLIC "
<html xmlns="
<head>
<meta http
<meta http
<meta name="auther" content="fq" />
<title>獲取鼠標坐標</title>
</head>
<body>
<script type="text/javascript">
function mousePosition(ev){
if(ev
return {x:ev
}
return {
x:ev
y:ev
};
}
function mouseMove(ev){
ev = ev || window
var mousePos = mousePosition(ev);
document
document
}
document
</script>
X:<input id="xxx" type="text" /> Y:<input id="yyy" type="text" />
</body>
</html>
From:http://tw.wingwit.com/Article/program/Java/JSP/201311/20203.html