JSFiddle - React, Tailwind, and code Playground
HTML
<input id="B1" type="button" value="XXX" />
<input id="B2" type="button" value="YYY" />
JavaScript
window.onload = function() {
var btn = document.getElementById("B1");
btn.addEventListener("click", F1);
}
$(function() {
$("#B2").bind('click', F2);
});
function F1(event) {
alert(event.target.value);
}
function F2(event) {
alert($(event.target).val());
}