JSFiddle - React, Tailwind, and code Playground

HTML

<input type="button" onclick="test(this)" value="test" id="22" />

JavaScript

window.test = function(element)  {
    alert($(element).prop('id'));
}