Discuss / JavaScript / 可以用:input,上一节讲过

可以用:input,上一节讲过

Topic source

savokiss

#1 Created at ... [Delete] [Delete and Lock User]
json = {};
var inputs = $('#test-form :input');
inputs.filter(function(){
   return this.type!='submit';
}).map(function(){
   json[this.name] = this.value;
});

json = JSON.stringify(json);

  • 1

Reply