你再两个单元格间换下位置看是不是每个点的坐标一样<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>新建网页 4</title>
</head><body>
<br/>X:<input type="text" id="X" readonly>
Y:<input type="text" id="y" readonly>
<script language="javascript">function showCoordinate(obj){
var r = getAbsolutePos(obj);
var x = document.getElementById("X");
var y = document.getElementById("Y");x.value = event.clientX -r.x-3;
y.value = event.clientY -r.y-3;
}function getAbsolutePos(el) {
var r = { x: el.offsetLeft, y: el.offsetTop };
if (el.offsetParent) {
var tmp = getAbsolutePos(el.offsetParent);
r.x += tmp.x;
r.y += tmp.y;
}
return r;
}</script>
<table border="1" width="100%" id="table1">
<tr>
<td width="181" height="210"> </td>
<td height="210">
</td>
<td height="210"> </td>
</tr>
<tr>
<td width="181" height="172"> </td>
<td height="172">
<p align="center">
<img src="http://zi.csdn.net/noname8.11.gif" onmousemove="showCoordinate(this);" width="330" height="90"></td>
<td height="172"> </td>
</tr>
<tr>
<td width="181"> </td>
<td>
</td>
<td> </td>
</tr>
<tr>
<td width="181"> </td>
<td> </td>
<td> </td>
</tr>
</table>
</body></html>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>新建网页 4</title>
</head><body>
<br/>X:<input type="text" id="X" readonly>
Y:<input type="text" id="y" readonly>
<script language="javascript">function showCoordinate(obj){
var r = getAbsolutePos(obj);
var x = document.getElementById("X");
var y = document.getElementById("Y");x.value = event.clientX -r.x-3;
y.value = event.clientY -r.y-3;
}function getAbsolutePos(el) {
var r = { x: el.offsetLeft, y: el.offsetTop };
if (el.offsetParent) {
var tmp = getAbsolutePos(el.offsetParent);
r.x += tmp.x;
r.y += tmp.y;
}
return r;
}</script>
<table border="1" width="100%" id="table1">
<tr>
<td width="181" height="210"> </td>
<td height="210">
</td>
<td height="210"> </td>
</tr>
<tr>
<td width="181" height="172"> </td>
<td height="172">
<p align="center">
<img src="http://zi.csdn.net/noname8.11.gif" onmousemove="showCoordinate(this);" width="330" height="90"></td>
<td height="172"> </td>
</tr>
<tr>
<td width="181"> </td>
<td>
</td>
<td> </td>
</tr>
<tr>
<td width="181"> </td>
<td> </td>
<td> </td>
</tr>
</table>
</body></html>
<!--
var where = "";
function checkwhere(e) {
if (document.layers){
xCoord = e.x;
yCoord = e.y;
}
else if (document.all){
xCoord = event.clientX;
yCoord = event.clientY;
}
else if (document.getElementById){
xCoord = e.clientX;
yCoord = e.clientY;
}
self.status = "X座标值= "+ xCoord + " Y座标值= " + yCoord + " ---eyaa----";
}
document.onmousemove = checkwhere;
if(document.captureEvents) {document.captureEvents(Event.MOUSEMOVE);}
-->
</script>
<form>
<input type="image" src="aaa.gif">
</form>----
点图片之后,自动提交,从request.getParameter("x");request.getParameter("y");就可以了.