Created
May 15, 2012 12:51
-
-
Save hikoz/2701515 to your computer and use it in GitHub Desktop.
request parameter
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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