/*
* 入参为要取的参数名,出参为值的数组对象
* 这里没有做是否存在相同的验证了
*/
function getQueryString(param){
var qs = (location.search.length >0?location.search.substring(1):""),
values=[],items = qs.split("&"),
item,name,value;
for(var i = 0 ,l = items.length;i item = items[i].split("="); name = decodeURIComponent(item[0]); value = decodeURIComponent(item[1]); if(param == name){ values.push(value); } } return values; }