xxxxxxxxxx
function myFunction() {
var x = document.getElementById("*passwordbox-id*");
if (x.type === "password") {
x.type = "text";
} else {
x.type = "password";
}
}
xxxxxxxxxx
<button type="button" class="buttonSign1"
style="background-color: #F8F8F8; outline:none;
border:1px solid rgb(0, 0, 0); height: 30px;
width: 180px; border-radius: 4px;font-size:15px;
margin-left: 3.5rem;margin-top: 4rem; font-weight:bold;"
type="submit"><img src="../img/heart.png" aria-hidden="true" style="width: 9%;margin-left: 0rem;margin-top: -0.2rem;"> Add to Watchlist</button>