jQuery滑动到页面底部

4
使用jQuery,我可以滑动到当前页面的底部吗?谢谢。
3个回答

7

您可以查看以下文章

$('#scrlBotm').click(function () {
    $('html, body').animate({
        scrollTop: $(document).height()
    }, 1500);
    return false;
});

2

你可以使用这段代码。

$('html, body').animate({scrollTop: $("body").height()}, 800);

1
你可以这样做:
$(document).scrollTop($(document).height());

如果你想要在点击时触发它:
$('#btn').click(function() {
    $(document).scrollTop($(document).height());
});

请查看演示1演示2


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接