function getQueryString(name) {
var reg = new RegExp( "(^|&)" name "=([^&]*)(&|$)", "i");
var r = location.search.substr(1).match(reg);
if (r != null) return unescape(decodeURI(r[2])); return null;
}
This method returns string
by default If it is an int type, it needs to be converted when using JS, such as using the parseInt(value) function.