<div class="codetitle"> <span><a style="CURSOR: pointer" data="7143" class="copybut" id="copybut7143" onclick="doCopy('code7143')"><u>复代码码</u></a></span> 代码如下:</div> <div class="codebody" id="code7143"> <br>function getScrollTop(){ <br>var scrollTop=0; <br>if(document.documentElement&&document.documentElement.scrollTop){ <br>scrollTop=document.documentElement.scrollTop; <br>}else if(document.body){ <br>scrollTop=document.body.scrollTop; <br>} <br>scrollTop을 반환합니다. <br>} <br> </div>