Created
March 16, 2016 11:08
-
-
Save julienchazal/452915f8c5a7ec95d5dc to your computer and use it in GitHub Desktop.
get URL parameter function
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
function getURLParameter(url, param) { | |
return decodeURIComponent((new RegExp('[?|&]' + param + '=' + '([^&;]+?)(&|#|;|$)').exec(url)||[,""])[1].replace(/\+/g, '%20'))||null; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment