Skip to content

Instantly share code, notes, and snippets.

@killerwolf
Created August 19, 2011 08:53
Show Gist options
  • Save killerwolf/1156375 to your computer and use it in GitHub Desktop.
Save killerwolf/1156375 to your computer and use it in GitHub Desktop.
extractUrlParams
////////////////////////////////////////////////
// Fonction de récupération des paramètres GET de la page
// @return Array Tableau associatif contenant les paramètres GET
////////////////////////////////////////////////
function extractUrlParams(){
var t = location.search.substring(1).split('&');
var f = [];
for (var i=0; i<t.length; i++){
var x = t[ i ].split('=');
f[x[0]]=x[1];
}
return f;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment