Discuss / JavaScript / 交个作业

交个作业

Topic source

好耶

#1 Created at ... [Delete] [Delete and Lock User]

json = {}

$('#test-form input,select').map(function(){

 if(this.type!='radio'||this.checked){

   json[this.name]=this.value;

 }

})

json = JSON.stringify(json,null,'  ')


  • 1

Reply