Advertisement
tnorman

JS ___________ get GET.object from window href

Feb 25th, 2016
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var getFind = function(){
  2.   var G={}
  3.   if ((window.location.href).split('?')[1]) {
  4.     var GR = ((window.location.href).split('?')[1]).split('&');
  5.     for (var i = 0; i < GR.length; i++) {
  6.       G[  GR[i].split('=')[0]  ] = GR[i].split('=')[1]
  7.     }
  8.   }
  9.   return G;
  10. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement