JSFiddle - React, Tailwind, and code Playground
HTML
<input type="text" id="hello"/>
<select name="cos">
<option value="1">1</option>
</select>
JavaScript
$('input, select').change(function(){
if($(this).is('select')===true) alert('select');
if($(this).attr("type") === 'text') alert('text');
})