Get the get parameter value in the URL

From , 5 Years ago, written in JavaScript, viewed 169 times.
URL https://pastebin.vip/view/4764f378
  1.  
  2. // 用法:如果地址是 test.htm?t1=1&t2=2&t3=3, 那么能取得:GET["t1"], GET["t2"], GET["t3"]
  3. function get_get(){
  4.     querystr = window.location.href.split("?")
  5.     if(querystr[1]){
  6.         GETs = querystr[1].split("&");
  7.         GET = [];
  8.         for(i=0;i<GETs.length;i++){
  9.               tmp_arr = GETs.split("=")
  10.               key=tmp_arr[0]
  11.               GET[key] = tmp_arr[1]
  12.         }
  13.     }
  14.     return querystr[1];
  15. }

Reply to "Get the get parameter value in the URL"

Here you can reply to the paste above

captcha

https://burned.cc - Burn After Reading Website