Skip to content

Instantly share code, notes, and snippets.

@TYRONEMICHAEL
Created April 19, 2012 09:20
Show Gist options
  • Save TYRONEMICHAEL/2419920 to your computer and use it in GitHub Desktop.
Save TYRONEMICHAEL/2419920 to your computer and use it in GitHub Desktop.
Javascript: Get Parameter from URL
getParamfromUrl: function (name) {
return decodeURI(
(new RegExp(name + '=' + '(.+?)(&|$)').exec(location.search) || [null])[1]
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment