javascrpt语言,怎么把checkbox转换成json,界面的转换的方式javascrpt语言,怎么把checkbox转换成json,界面的转换的方式
var kv={} Array.prototype.slice.call(document.querySelectorAll('input[type=checkbox]')).forEach(function(el){kv[this.name]=this.value})