$(function(){ // 返回顶部 $('.totop2').on('click',function(){ $('body').animate({ scrollTop:0 },500) return false; }) })