jq滚动到顶部

 <script>
$("#returnTop").click(function () {
        var speed=1000;//滑动的速度
        $('body,html').animate({ scrollTop: 0 }, speed);
        return false;
 });
 </script>

猜你喜欢

转载自blog.csdn.net/qq_40181953/article/details/78578342