If you just want to get the values from the query string, I use the following function:
function getQuerystring(key)
{
key = key.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
var regex = new RegExp("[\\?&]"+key+"=([^&#]*)");
var qs = regex.exec(window.location.href);
if(qs == null)
return default_;
else
return qs[1];
}
Just go through the key you are looking for and return the value. IE: getQueryString ('upgradeed') will return true
source
share