标签:class 对象 esc amp 参数 asc string var str
parseQueryString(url) { var obj = {}; var keyvalue = []; var key = "", value = ""; var paraString = url.substring(url.indexOf("?") + 1, url.length).split("&"); for (var i in paraString) { keyvalue = paraString[i].split("="); key = keyvalue[0]; value = keyvalue[1]; obj[key] = value; } return obj; },
参数转对象 类似 ?camera=1&travel=0&faceScore=1
标签:class 对象 esc amp 参数 asc string var str
原文地址:http://www.cnblogs.com/lfqcode/p/7650328.html