nPhoenix

$_GET em javascript

Oct 25th, 2013
241
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /*
  2. By phoenix...
  3. */
  4. function $_GET(string) {
  5.     var GET = eval('location.href.split("?")[1].match(/' + string + '=(.+)/)[0].split("=")[1]');
  6.     if (GET.match("&")) {
  7.         GET = GET.split("&")[0];
  8.     };
  9.     return GET;
  10. };
Advertisement
Add Comment
Please, Sign In to add comment