标签:class http cti logs php blog ++ turn function
var url = "http://test.cn/index.php?class=9&id=2&key=88"; function parseQueryString(url){ var params = {}; var arr = url.split("?"); if(arr.length <=1) return params; arr = arr[1].split("&"); for(var i=0,l=arr.length; i<l; i++){ var a = arr[i].split("="); params[a[0]] = a[1]; } return params; } var ps = parseQueryString(url); console.log(ps);
标签:class http cti logs php blog ++ turn function
原文地址:http://www.cnblogs.com/freezyh/p/7519371.html