标签:
格式:name=wang&age=18&sex=男
var person = {
name:‘wang‘,
age:18,
sex:‘男‘,
};
function getData(str){
var str=‘‘;
for(var i in person){
str += i+‘=‘+person[i] + ‘&‘;
};
return str.substring(0,str.length-1);
}
console.log(getData(person));
标签:
原文地址:http://www.cnblogs.com/h5c3/p/5797808.html