/** * js简单对象转为url查询字符串key=value& */ function obj2UrlQuery(obj) { var urlQurey = ""; for(var key in obj) { urlQurey += key + "=" + obj[key] + "&"; } if(urlQurey != "") urlQurey = urlQurey.substring(0,urlQurey.length-1); return urlQurey; }
/** * js简单对象转为url查询字符串key=value& */ function obj2UrlQuery(obj) { var urlQurey = ""; for(var key in obj) { urlQurey += key + "=" + obj[key] + "&"; } if(urlQurey != "") urlQurey = urlQurey.substring(0,urlQurey.length-1); return urlQurey; }