Home Gitesh Portfolio Blog About Me Gallery Contact
Kentico Certified Developer

Get all URL query string parameters with a Jquery

varparams = {};
varURLParams = "";
varps = window.location.search.split(/\?|&/);
for (vari = 0; i<ps.length; i++) {
if (ps[i]) {
var p = ps[i].split(/=/);
params[p[0]] = p[1];
URLParams = URLParams + p[0] + '=' + p[1] + '&';                 
            }
      }     

params.abc to get each parameter
OR
useURLParams to get the whole Query String


 
Nice example:
http://jquery-howto.blogspot.co.nz/2009/09/get-url-parameters-values-with-jquery.html

Posted: 22/04/2013 8:54:18 p.m. by Gitesh Shah | with 0 comments