- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
function getQueryParam(param) {
if (!getQueryParam.params) {
var params = {},
query = window.location.search.substring(1);
if (query) {
var queryParts = query.split('&'),
queryPartsLen = queryParts.length,
decode = decodeURIComponent;
while (queryPartsLen--) {
var queryPart = queryParts[queryPartsLen].split('='),
key = queryPart[0],
value = queryPart[1];
params[decode(key)] = decode(value) || null;
}
}
getQueryParam.params = params;
}
return getQueryParam.params[param] || null;
}