Skip to content

Instantly share code, notes, and snippets.

@jjmu15
Created April 7, 2014 09:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jjmu15/10017223 to your computer and use it in GitHub Desktop.
Save jjmu15/10017223 to your computer and use it in GitHub Desktop.
js get url paramter
function urlParam(name){
var results = new RegExp("[\\?&]" + name + "=([^&#]*)").exec(window.location.href);
if(results) {
return results[1];
}
return false;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment