[在线]如何让pop窗口精确显示在一个文本框上?
文本框在一个iframe中,如何让pop窗口精确显示在一个文本框上?
代码如下
a.htm
=====================================================
<table width="600" border="1">
<tr >
<td width="180">占位</td>
<td height="200" ><iframe name="test" id="test" scrolling="no" noresize src="b.htm" width=100% height=100% frameborder=0></iframe></td>
</tr>
</table>
=====================================================
b.htm
=====================================================
<script>
oPopup = window.createPopup();
function createPop(obj){
var oPopBody = oPopup.document.body
oPopBody.style.backgroundColor = "lightyellow";
oPopBody.style.border = "solid black 1px";
oPopBody.innerHTML = 'test';
//下面代码在iframe中不能精确定位 请忙帮 看看
oPopup.show(window.screenTop, window.screenLeft,300, 200);
}
</script>
<p>占位</p>
<p><input name="b" type="text" id="b" onClick="test(this)"></p>
=====================================================
多谢大家了