var arr={};
json = $('#test-form :input').not('button');
json.filter(function(){
return this.type!=='radio'|| this.checked;
}).map(function(){
return arr[this.name]=this.value;
}).get();
json=JSON.stringify(arr);
Sign in to make a reply
奶黄包丸子
var arr={};
json = $('#test-form :input').not('button');
json.filter(function(){
return this.type!=='radio'|| this.checked;
}).map(function(){
return arr[this.name]=this.value;
}).get();
json=JSON.stringify(arr);