Fake input password
HTML
<input style="color: #ccc" type="password" id="somePassword" value="Password" />
JavaScript
function newPass(){
alert("bumm");
return "smthgenerated";
}
document.getElementById("somePassword").value = newPass();
<input style="color: #ccc" type="password" id="somePassword" value="Password" />
function newPass(){
alert("bumm");
return "smthgenerated";
}
document.getElementById("somePassword").value = newPass();