var showx = event.screenX - event.offsetX - 4 - 210 ; // LEFT
var showy = event.screenY - event.offsetY + 18; // TOP;

解决方案 »

  1.   

    TO:wuxinlangman  不行诶
      

  2.   

    TO: kafly
     得到 (0,0)
    好像不对诶
      

  3.   

    用一个position:absolute加一个position.relative可以解决定位的问题:<html><head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    <title>JK:支持民族工业,尽量少买X货</title>
    </head><SCRIPT LANGUAGE="JavaScript">
    function showTipsFun(obj)
    {
      tipsContent.innerHTML=obj.tipsStr;
      obj.insertAdjacentElement("beforeBegin",tipsContainer);
      tipsContainer.style.display="";
    }function hideTipsFun(obj)
    {
      tipsContainer.style.display="none";
    }
    </SCRIPT><body >
    <div id=tipsContainer style="position:absolute;display:none;">
      <div id=tipsContent style="position:relative;top:25;background-color:#FFFFCC;border:1px solid #000000;z-index:1000;"></div>
    </div>
    <table  border="1" width=500 >
      <tr>
        <td>focus出现提示:<input name="text" type=text onfocus="showTipsFun(this);" onblur="hideTipsFun(this);" tipsStr="提<font size=50px color=red>示</font>1"></td>
        <td><input name="text" type=text onfocus="showTipsFun(this);" onblur="hideTipsFun(this);" tipsStr="提示2"></td>
      </tr>
    </table></body>
    </html>