var loc = document.location.toString().split('#')[0];
    document.location = loc + '#' + anchor;

 

相关文章: