
Untitled
By: a guest on
May 22nd, 2012 | syntax:
None | size: 0.47 KB | hits: 11 | expires: Never
function(){
a=location.search; // Get the current query string of the window
b=a.substring(1); // Remove the '?'
c=b.split("&"); // Split the query string into separate variables
f=[]; // Create the array to hold the query string variables
for(d in c){ // Loop through the variables
e=c[d].split("="); // Split the variables into key => value
f[e[0]]=e[1]; // Add the key and value to our array
}
return f; // Return the array when all variables have been looped
}