<table border=1 id=table1>
<tr>
<td id=td1>
<div id=div1 style="position:relatvie;width:100;height:100;background-color:red"><p>test</p><p>test</p><p>test</p><p>test</p></div>
</td>
</tr>
</table>
<tr>
<td id=td1>
<div id=div1 style="position:relatvie;width:100;height:100;background-color:red"><p>test</p><p>test</p><p>test</p><p>test</p></div>
</td>
</tr>
</table>
<html>
<head>
<title>title</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body bgcolor="#FFFFFF" text="#000000" ><center>
<form name="frm" action="" method="post" >
<table width="760" cellpadding="0" cellspacing="0" border="1" class="titlesty" id="tb1">
<tr >
<td height="29" nowrap valign="middle"> </td>
</tr>
<tr>
<td id="td1" height="18" nowrap bordercolor="#FFFFFF" valign="middle">
<div id="Layer1" style="position:absolute; width:357px; height:8px; left:57px; visibility: visible; z-index:1; top: 139px; border: 1px none #000000; background-color: #00FF00; layer-background-color: #00FF00" >
当前层的位置</div>
</td>
</tr>
</table>
<script language="JavaScript">
document.all.Layer1.style.pixelLeft = document.all.td1.offsetLeft + document.all.tb1.offsetLeft+10;
document.all.Layer1.style.pixelTop = document.all.td1.offsetTop + document.all.tb1.offsetTop+1;
</script>
</form>
</center>
</body>
</html>
把 <div id="Layer1" style="position:absolute; width:357px; height:8px; left:57px; visibility: visible; z-index:1; top: 139px; border: 1px none #000000; background-color: #00FF00; layer-background-color: #00FF00" > 中的
absolute(表示绝对)改成 relatvie(代表相对)就行了。