Skip to content

Instantly share code, notes, and snippets.

@modemlooper
Created July 6, 2015 14:34
Show Gist options
  • Save modemlooper/43f768fff1cfacad9cfa to your computer and use it in GitHub Desktop.
Save modemlooper/43f768fff1cfacad9cfa to your computer and use it in GitHub Desktop.
Get url param javascript
function getURLParameter(name) {
return decodeURIComponent((new RegExp('[?|&]' + name + '=' + '([^&;]+?)(&|#|;|$)').exec(location.search)||[,""])[1].replace(/\+/g, '%20'))||null
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment