1.
<div class="footer-gotop" id="gotop"> Back to top </div>
2.
$(function() { $("#gotop").click(function() {
当点击跳转链接后,滚动条到0的位置(页面顶部),速度为500 $('html,boby').animate({'scrollTop': 0}, 500); })})