获取参数值 function getQueryString(name, isURLEncode) { var reg = new RegExp("(^|)" + name + "=([^]*)(|$)", "i"); var value = window.location.search.substr(1).match(reg); if (!value) { return null; } if (isURLEncode) { return decodeURI
function getQueryString(name, isURLEncode) { var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i"); var value = window.location.search.substr(1).match(reg); if (!value) { return null; } if (isURLEncode) { return decodeURI(value[2]); } else { return unescape(value[2]); } }