Skip to content

Instantly share code, notes, and snippets.

@hikoz
Created May 15, 2012 12:51
Show Gist options
  • Save hikoz/2701515 to your computer and use it in GitHub Desktop.
Save hikoz/2701515 to your computer and use it in GitHub Desktop.
request parameter
function getParams() {
var params = {}
var h = location.href.replace(/^.*\?/, '').split('&')
for (var i = 0; i < h.length; ++i) {
var p = h[i].split('=')
params[p[0]] = p[1];
}
return params;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment