代码如下: [removed] String.prototype.getQuery = function(name){ var reg = new RegExp(‘(^|\\?|&)’+name+’=([^&]*|$)’), url = this.replace(/&/g, ‘&’), r = url.match(reg); return r === null ? null : unescape(r[2]); } var str = ‘http://wpa.qq.com/msgrd?v=3&ui