Created
December 29, 2022 08:53
-
-
Save LeMiira/3913ed8430317abc4ec449babaee815b to your computer and use it in GitHub Desktop.
Get URL parameters in jQuery
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
//https://stackoverflow.com/a/26744533/861265 | |
function getURLParams(url){ | |
var p={}; | |
url.replace(/[?&]+([^=&]+)=([^&]*)/gi,function(s,k,v){p[k]=v}) | |
return p; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment