var selectCount=[]; 添加元素: selectCount.push($(this).val()); 删除元素: var index=selectCount.indexOf($(this).val()); if(index!=-1){ selectCount.splice(index,1); }