<body onload="init()">
<script>
function init(){
var dv=document.getElementById("v")
var t1=document.getElementById("td1")
dv.style.pixelTop=t1.offsetTop+t1.offsetParent.offsetTop
dv.style.pixelLeft=t1.offsetLeft+t1.offsetParent.offsetLeft+t1.offsetWidth
dv.style.pixelHeight=t1.offsetHeight
}
</script>
<table border="1" width="100">
<tr>
<td width="100%" id="td1">1</td>
</tr>
<tr>
<td width="100%">2</td>
</tr>
</table>
<div id=v style="position:absolute;background-color:#f2f2f2"><input type=button value=ok></div>
</body>
<script>
function init(){
var dv=document.getElementById("v")
var t1=document.getElementById("td1")
dv.style.pixelTop=t1.offsetTop+t1.offsetParent.offsetTop
dv.style.pixelLeft=t1.offsetLeft+t1.offsetParent.offsetLeft+t1.offsetWidth
dv.style.pixelHeight=t1.offsetHeight
}
</script>
<table border="1" width="100">
<tr>
<td width="100%" id="td1">1</td>
</tr>
<tr>
<td width="100%">2</td>
</tr>
</table>
<div id=v style="position:absolute;background-color:#f2f2f2"><input type=button value=ok></div>
</body>
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货