String.prototype.GetValue = function (para) {标签:GetValue,return,para,queryString,JS,var,null,reg From: https://blog.51cto.com/u_21817/6066915
var reg = new RegExp("(^|&)" + para + "=([^&]*)(&|$)");
var r = this.substr(this.indexOf("\?") + 1).match(reg);
if (r != null) return unescape(r[2]); return null;
}
var str = "www.sina.com/defalut.aspx?ID=123456";
alert(str.GetValue("ID"));