1
I’m using Labelfor, I wanted when clicking above to enter the password, displayed the characters, and when clicking outside was hidden, how could I do?
<div class="form-group">
@Html.LabelFor(model => model.Senha, htmlAttributes: new { @class = "control-label col-md-2" })
<div class="col-md-10">
@Html.EditorFor(model => model.Senha, new { htmlAttributes = new { @class = "form-control"} })
@Html.ValidationMessageFor(model => model.Senha, "", new { @class = "text-danger" })
</div>
</div>
Change the input type to "text" when in focus (onfocus), when not, change to password.
– Wilson Santos