var data = {}; $('#test-form').find('input').filter('[type!=radio]').each(function(){ data[this.name] = this.value; }); data.gender = $('input[name=gender]:checked').val(); data.city = $('select[name=city]').val(); json = JSON.stringify(data);
Sign in to make a reply
老韩TY