JS换址转向(更换域名时候用)

<script language="javascript"> 
var str=window.location.href; 
//在此我想将字母a替换成字母A
var gostr=str.replace("yellowurl","yellowurls");
window.location.href
=gostr;
</script>     
原文地址:https://www.cnblogs.com/lgms2008/p/1153580.html