替换地址栏

5年以前  |  阅读数:406 次  |  编程语言:JavaScript 
function locationReplace(url) {
  if (history.replaceState) {
    history.replaceState(null, document.title, url);
    history.go(0);
  } else {
    location.replace(url);
  }
}

Copyright© 2013-2020

All Rights Reserved 京ICP备2023019179号-8