- 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;
}
guest 11.12.2015 14:19 # +4
guest 12.12.2015 00:26 # 0
3_14dar 12.12.2015 17:05 # 0
bormand 12.12.2015 18:04 # +1