Guest User

Untitled

a guest
May 23rd, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. function getQuerySrings() {
  2. var qs = location.search.length > 0 ? location.search.substring(1) : "";
  3. var args = {};
  4. var items = qs.length ? qs.split('&') : [];
  5. var item = null,
  6. name = null,
  7. value = null,
  8. i = 0;
  9. for (var i = 0; i < items.length; i++) {
  10. item = items[i].split('=');
  11. name = decodeURIComponent(item[0]);
  12. value = decodeURIComponent(item[1]);
  13. if (name.length) {
  14. args[name] = value;
  15. }
  16. }
  17. return args;
  18. }
Add Comment
Please, Sign In to add comment