Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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
- }
Add Comment
Please, Sign In to add comment