var obj = {}; var name = $('#test-form :input,#test-form :radio'); name.filter(function(){return this.type !== 'submit'}).each(function(){ if (this.type !== 'radio' || this.checked) { obj[this.name] = this.value; } }); json = JSON.stringify(obj);
Sign in to make a reply
不思考会锈逗