tmc_angel

get

Jan 18th, 2012
48
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function getParameterByName(name)
  2. {
  3.   name = name.replace(/[\[]/, "\\\[").replace(/[\]]/, "\\\]");
  4.   var regexS = "[\\?&]" + name + "=([^&#]*)";
  5.   var regex = new RegExp(regexS);
  6.   var results = regex.exec(window.location.href);
  7.   if(results == null)
  8.     return "";
  9.   else
  10.     return decodeURIComponent(results[1].replace(/\+/g, " "));
  11. }
RAW Paste Data