28,390
社区成员
发帖
与我相关
我的任务
分享
//获取域名
host=document.domain;
if( host=='www.xxx.com' )//如果是旧域名
{
//获取完整的地址
url = window.location.href;
url = url.replace("http://","").replace(host,"")
//获取路径,文件名
pare = url.split("?");
path = pare[0];
//获取QueryString
if( pare.length>1 )
{
Query = pare[1];
//循环Get Key
Querys = Query.split("&");
for(i=0;i<Querys.length;i++){
QueryItem = Querys[i].split("=");
Key = QueryItem[0];Value = QueryItem[1];
}
}
}