JSFiddle - React, Tailwind, and code Playground
HTML
<input type="password" id='password' onclick='Change()' placeholder="Enter your password" />
JavaScript
function Change()
{
alert('Called');
$("#password").prop('type','text');
}
<input type="password" id='password' onclick='Change()' placeholder="Enter your password" />
function Change()
{
alert('Called');
$("#password").prop('type','text');
}