function getQueryParams(qs) {
qs = qs.split("+").join(" ");
var params = {};
var tokens;
while (tokens = /[?&]?([^=]+)=([^&]*)/g.exec(qs)) {
params[decodeURIComponent(tokens[1])]
= decodeURIComponent(tokens[2]);
}
return params;
}
var $_GET = getQueryParams(document.location.search);
źródło: http://stackoverflow.com/questions/439463/how-to-get-get-and-post-variables-with-jquery
Brak komentarzy:
Prześlij komentarz