浏览器Console引入jQuery
var jquery = document.createElement('script');
jquery.src = 'https://cdn.bootcss.com/jquery/3.2.0/jquery.js';
document.getElementsByTagName('head')[0].appendChild(jquery);
jQuery.noConflict();
浏览器自动滚动
var int_timer = setInterval(function(){
var autoRun = 300; // 每次自动滚动的高度
var nowHeight = $("#scrolling-child").scrollTop(); // 获取浏览器滚动条元素的滚动条当前高度
$("#scrolling-child").animate({scrollTop:nowHeight + autoRun}, 200); //自动滚动
},500)
停止滚动
window.clearInterval(int_timer)
回到顶部
$("#scrolling-child").scrollTop();