本帖最后由 lzgctgc 于 2011-08-22 13:57:55 编辑

解决方案 »

  1.   

    <div style="height: 400px; overflow: auto;" id="DivContent" onscroll="TalkReadState()">
        <table class="TalkFormClass">
            <tr>
            </tr>
        </table>
        <table class="TalkFormClass">
            <tr>
                <td>
                </td>
            </tr>
        </table>
        <table id="dlReplyTalk" cellspacing="0" border="0" style="border-width: 0px; width: 100%;
            border-collapse: collapse;">
            <tr>
                <td style="width: 100%;">
                    <table class="TalkFormClass">
                        <tr id='23Content' style="display: block">
                            <td style="background-color: #ffffff;">
                                <div class="TalkLoadContent" id='loadReply23' style="display: block">
                                    <span style='color: #A9A9A9;'>回复内容加载中...</span><script type="text/javascript">SetTalkReplySysID('23','0')</script></div>
                                <div id='showReply23' style="display: none" title='0$23'>
                                </div>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>
    </div>我简化了页面,showReply23 相对 DivContent  的距离
      

  2.   

    <div style="height: 400px; overflow: auto;" id="DivContent" onscroll="TalkReadState()">
        <table class="TalkFormClass">
            <tr>
            </tr>
        </table>
        <table class="TalkFormClass">
            <tr>
                <td>
                </td>
            </tr>
        </table>
        <table id="dlReplyTalk" cellspacing="0" border="0" style="border-width: 0px; width: 100%;
            border-collapse: collapse;">
            <tr>
                <td style="width: 100%;">
                    <table class="TalkFormClass">
                        <tr id='23Content' style="display: block">
                            <td style="background-color: #ffffff;">
                                <div class="TalkLoadContent" id='loadReply23' style="display: block">
                                    <span style='color: #A9A9A9;'>回复内容加载中...</span><script type="text/javascript">SetTalkReplySysID('23','0')</script></div>
                                <div id='showReply23' style="display: none" title='0$23'>
                                </div>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>
    </div>
      

  3.   

    var t1=document.getElementById("DivContent").style.top;
    var t2=document.getElementById("showReply23").style.top;
    alert( parseInt(t2)- parseInt(t1));