Advertisement
Guest User

Untitled

a guest
Dec 8th, 2013
160
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     function getParameterByName(name) {
  2.         name = name.replace(/[\[]/, "\\\[").replace(/[\]]/, "\\\]");
  3.         var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"),
  4.         results = regex.exec(location.search);
  5.         return results == null ? "" : decodeURIComponent(results[1].replace(/\+/g, " "));
  6.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement