跳转到页面的某个anchor

    var loc = document.location.toString().split('#')[0];
    document.location = loc + '#' + anchor;
原文地址:https://www.cnblogs.com/argenbarbie/p/8463020.html