//获取地址参数值
function getParameter(name)
{
var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)");
var r = window.location.search.substr(1).match(reg);
if (r!=null) return r[2]; return null;
}
转载于:https://www.cnblogs.com/wangdetian168/archive/2009/02/27/1399676.html