jQuery点击按钮页面滚动条向下滚动

方式一:可以控制滚动速度300

 
 $("#id").click(function() {
          $("input[name='?']").prop("checked",$(this).prop("checked"));
          if($("#checkAll").prop("checked")) {
               $("input[name='?']:checkbox").each(function() {
                    $(this).attr("checked", true);
               })
          } else {
               $("input[name='?']:checkbox").each(function() {
                  $(this).attr("checked", false);
               })
          }

 });
 

 方式二:

$(document).scrollTop(400);

 

 

原文地址:https://www.cnblogs.com/gyn1994/p/5780053.html