1 function request(paras) { 2 var url = location.href; 3 var paraString = url.substring(url.indexOf("?") + 1, url.length).split("&"); 4 var paraObj = {} 5 for (i = 0; j = paraString[i]; i++) { 6 paraObj[j.substring(0, j.indexOf("=")).toLowerCase()] = j.substring(j.indexOf("=") + 1, j.length); 7 } 8 var returnValue = paraObj[paras.toLowerCase()]; 9 if (typeof (returnValue) == "undefined") { 10 return ""; 11 } else { 12 return returnValue; 13 } 14 }