Skip to content

Instantly share code, notes, and snippets.

@JumboLove
Created June 25, 2013 15:52
Show Gist options
  • Select an option

  • Save JumboLove/5859608 to your computer and use it in GitHub Desktop.

Select an option

Save JumboLove/5859608 to your computer and use it in GitHub Desktop.
Get the URL parameter specified
function urlParam(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