Skip to content

Instantly share code, notes, and snippets.

@phsantiago
Created February 22, 2016 15:13
Show Gist options
  • Save phsantiago/cdf8e8c1668ba96053dc to your computer and use it in GitHub Desktop.
Save phsantiago/cdf8e8c1668ba96053dc to your computer and use it in GitHub Desktop.
param = 'KEY_PARAMETRO';
q = location.search.replace('?', '&').split('&');
i = 0;
while(i < q.length){
value = (q[i].split('=')[0] == param? q[i].split('=')[1] : null);
i++;
}
console.log(value);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment