且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何将 HTML 页面滚动到给定的锚点

更新时间:2022-06-07 04:45:18

function scrollTo(hash) {
    location.hash = "#" + hash;
}

根本不需要 jQuery!

No jQuery required at all!