//#region 获取地址栏的参数值 (多个)
function getQueryString(name) {
var r = window.location.search.substr(1)
var s = r.replace(/&/g, '=');
var strs = s.split("=");
var json = {};
for (var i = 0; i < strs.length; i++) {
json[strs[i]] = strs[i + 1];
}
return json[name];
}
function getQueryString(name) {
var r = window.location.search.substr(1)
var s = r.replace(/&/g, '=');
var strs = s.split("=");
var json = {};
for (var i = 0; i < strs.length; i++) {
json[strs[i]] = strs[i + 1];
}
return json[name];
}
//#endregion
//单个(中文编码)
function getQueryString(name) {
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
var r = decodeURIComponent(window.location.search.substr(1)).match(reg);
if (r != null) return unescape(r[2]); return null;
}
var a = getQueryString("key");
v = encodeURIComponent(v);
//ajax 后台接收
//string key = context.Request["key"].ToString();
// key=context.Server.UrlDecode(key);
//使用 var inde = getQueryString("index");