JSFiddle - React, Tailwind, and code Playground

HTML

<form id="formId" >
<textarea> </textarea>

<select> </select>

<input type="text" />
<input type="radio" />

</form>

JavaScript

$('#formId :input').click(function() {
    alert(this.tagName != 'INPUT' ? this.tagName : this.type);
});