Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/84.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 使用jQuery跳转到页面底部-不带动画_Javascript_Jquery - Fatal编程技术网

Javascript 使用jQuery跳转到页面底部-不带动画

Javascript 使用jQuery跳转到页面底部-不带动画,javascript,jquery,Javascript,Jquery,如何使用jQuery跳转到页面底部 我不想要一个更平滑的动画,只是为了“跳跃”。我在这个网站上发现的所有其他问题似乎都与动画有关 这样就可以了 $('html, body').scrollTop( $(document).height() ); 带有动画的 $("html, body").animate({ scrollTop: $(document).height() }, "slow"); 没有动画 $('html, body').scrollTop( $(document).heigh

如何使用jQuery跳转到页面底部

我不想要一个更平滑的动画,只是为了“跳跃”。我在这个网站上发现的所有其他问题似乎都与动画有关

这样就可以了

$('html, body').scrollTop( $(document).height() );

带有动画的

$("html, body").animate({ scrollTop: $(document).height() }, "slow");
没有动画

$('html, body').scrollTop( $(document).height() );

您可以为此使用锚定标记,无需jquery

在页面底部的
标记之前放置一个锚定标记。比如

<a name="pageend"></a>

$('smthn')。滚动顶部(999999999)


99999999999是jquery的最大输入,它可以将元素带到最后一个滚动位置。

可能重复@JonathanNaguin,但实际上不是重复。
<a href="#pageend">Jump to page end</a>