SOURCE

console 命令行工具 X clear

                    
>
console

// $("#cleanInputAndSelectId input:not([type = checkbox])").each(function() {
//   $(this).val('');
// });

var base = 'http://localhost:8080';
$(function(){
  debugger;
  var data123=[];
  //{"id":123;"text":你好},{"id":123;"text":你好}{"id":123;"text":你好}
  data123.push({id: "all", text: "所有"});
 	data123.push({id: "3", text: "救援队伍"});
  data123.push({id: "4", text: "省级救援队伍"});
  data123.push({id: "1040124023335825410", text: "官渡队救援队"});
  data123.push({id: "1098408194903359489", text: "省级救援队A"});
  data123.push({id: "1103586001807646722", text: "AA测试救援队"});
  console.log(data123[0].id);
    // $("#abc").val(data[0].id).select2({
    //     data: data,
    //     allowClear: true,
    //     multiple: false,
    //     minimumResultsForSearch: -1
    // });
});
})
<script src="https://cdn.bootcss.com/jquery/2.2.4/jquery.js">
</script>
<script src="http://localhost:8080/assets/plugins/select2/select2.min.js" type="text/javascript">
</script>
<div id="cleanInputAndSelectId">
  <input value="111"/>
  <input type="checkbox" value="222"/>123
  <input value="333"/>
  

  <select id="abc" name="a">
  </select>
</div>