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);
});
});
<html>
<head>
</head>
<body>
<input type="text" id="txtName" />
</body>
</html>
$(function(){
$('input#txtName').click(function () {
alert($(this).val);
});
});