Use the attr()
method to get id. Like this:
$(this).attr('id');
Do you need such a result?
$("#merge_button").click(function(event){
event.preventDefault();
var searchIDs = $("#find-table input:checkbox:checked").map(function(){
return $(this).attr('id');
}).toArray();
console.log(searchIDs);
});
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<div id="find-table">
<input id="1" type="checkbox">
<input id="2" type="checkbox">
<input id="3" type="checkbox">
</div>
<button id="merge_button">merge</button>
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…