Created
October 18, 2022 06:30
-
-
Save MrWhiteD/789bfd7918b0375200748ce5f1af2921 to your computer and use it in GitHub Desktop.
[get параметры JS] #js #_GET #javascript
This file contains 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
var params = window.location.search.replace('?','').split('&').reduce( | |
function(p,e){ | |
var a = e.split('='); | |
p[ decodeURIComponent(a[0])] = decodeURIComponent(a[1]); | |
return p; | |
}, | |
{} | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment