JS取URL参数值的一个方法

Code
function GetQueryValue(name)
{
var reg=new RegExp("(^|&)"+ name +"=([^&]*)(&|$)");
var r=window.location.search.substr(1).match(reg);
if (r!=null) return unescape(r[2]);
return "";
}
原文地址:https://www.cnblogs.com/KenBlove/p/1310581.html