JSFiddle - React, Tailwind, and code Playground

HTML

<html>
<head>
</head>
<body>
<input type="text" id="txtName" />
</body>
</html>

JavaScript

$(function(){
    $('input#txtName').click(function () {
        alert($(this).val);
    });
});