Created
August 28, 2013 18:31
-
-
Save JumboLove/6369527 to your computer and use it in GitHub Desktop.
Get URL param from key
This file contains hidden or 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
//Returns the value of the URL parameter input key | |
urlParam: function(key){ | |
var result = new RegExp(key + "=([^&]*)", "i").exec(window.location.search); | |
return result && result[1] || ""; | |
}, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment