标签:search order 参考文献 for循环 string bst ble 开头 循环
1 function getQueryStringArgs() { 2 // 取得查询字符串并去掉开头的问好 3 var qs = (location.search.length > 0 ? location.search.substring(1) : ""); 4 5 // 保存数据的对象 6 args = {}; 7 8 // 取得每一项 9 var items = qs.length ? qs.split("&") : []; 10 var item = null; 11 var name = null; 12 var value = null; 13 14 // 在for循环中使用 15 for (var i = 0; i < items.length; i++) { 16 item = items[i].split("="); 17 name = decodeURIComponent(item[0]); 18 value = decodeURIComponent(item[1]); 19 20 if (name.length) { 21 args[name] = value; 22 } 23 } 24 return args; 25 }
标签:search order 参考文献 for循环 string bst ble 开头 循环
原文地址:https://www.cnblogs.com/jswolf/p/9975618.html