var alts = {}; $('#test-form :text,#test-form :password,#test-form input[name=gender]:checked,#test-form select').map(function(){ alts[this.name] = this.value; }); json = JSON.stringify(alts);
Sign in to make a reply
吉岸齐昂
var alts = {}; $('#test-form :text,#test-form :password,#test-form input[name=gender]:checked,#test-form select').map(function(){ alts[this.name] = this.value; }); json = JSON.stringify(alts);