2009-11-10 44 views

回答

1

您可以在这里找到脚本。

+0

谢谢这的确解决方案 – ant

4

在jQuery中:

$(document).ready(function() { 

    $('a[href=#top]').click(function(){ 
     $('html, body').animate({scrollTop:0}, 'slow'); 
     return false; 
    }); 

}); 

然后,您可以生成链接是这样的:

<a href="#top" title="Scroll back to the top">Back to the top</a>