Get the URL address? The wording of the following parameter values
Regular:
1 functiongetquerystring (name)2 {3 varReg =NewRegExp ("(^|&)" + name + "= ([^&]*) (&|$)");4 varr = Window.location.search.substr (1). Match (reg);5 if(r!=NULL)returnUnescape (r[2]);return NULL;6 }7 8 //Calling Methods9Alert (getquerystring ("name"));TenAlert (getquerystring ("name")); OneAlert (getquerystring ("name"));
Another type of:
1 functionGeturlparam (paraname) {2 varURL =document.location.toString ();3 varArrobj = Url.split ("?"));4 5 if(Arrobj.length > 1) {6 varArrpara = Arrobj[1].split ("&");7 vararr;8 9 for(vari = 0; i < arrpara.length; i++) {Tenarr = arrpara[i].split ("="); One A if(Arr! =NULL&& arr[0] = =paraname) { - returnArr[1]; - } the } - return""; - } - Else { + return""; - } + } AAlert (Geturlparam ("T"))
JS gets the URL pass-through parameter's notation