我正在使用这个SOquestion使用复选框处理我的过滤器搜索。这是JS$('input[type="checkbox"]').on('change',function(e){vardata={},fdata=[],loc=$('',{href:window.location})[0];$('input[type="checkbox"]').each(function(i){if(this.checked){if(!data.hasOwnProperty(this.name)){data[this.name]=[];}data[this.name].push(this.value);}