Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/420.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 我的脚本只有在脚本中有警报功能时才起作用_Javascript_Jquery - Fatal编程技术网

Javascript 我的脚本只有在脚本中有警报功能时才起作用

Javascript 我的脚本只有在脚本中有警报功能时才起作用,javascript,jquery,Javascript,Jquery,我的脚本只有在具有警报功能时才起作用 我想把我的div滚动到底部。我进行了研究,但我的脚本在没有警报功能的情况下无法执行 $document.readyfunction{ $display message.animate{scrollTop:$'display-message'.propscrollHeight},1; }; 实际上,您需要像这样设置身体动画: $(document).ready(function() { $('html, body').animate({ scro

我的脚本只有在具有警报功能时才起作用

我想把我的div滚动到底部。我进行了研究,但我的脚本在没有警报功能的情况下无法执行

$document.readyfunction{ $display message.animate{scrollTop:$'display-message'.propscrollHeight},1; };
实际上,您需要像这样设置身体动画:

$(document).ready(function() {
  $('html, body').animate({
    scrollTop: $("#display-message").offset().top
  }, 2000);
});