Search
 
SCRIPT & CODE EXAMPLE
 

HTML

show/hide password html

Two ways

<!DOCTYPE html>
<html>
<body>

<button type="button"
onclick="document.getElementById('pass').type = 'password'">
Hide</button>

<button type="button"
onclick="document.getElementById('pass').type = 'text'">
Show</button>

<input id="pass" type="password" value="RickAstley">

</body>
</html> 

<!DOCTYPE html>
<html>
<body>
<!-- Password field -->
Password: <input type="password" value="FakePSW" id="myInput">

<!-- An element to toggle between password visibility -->
<input type="checkbox" onclick="myFunction()">Show Password

function myFunction() {
  var x = document.getElementById("myInput");
  if (x.type === "password") {
    x.type = "text";
  } else {
    x.type = "password";
  }
}
</body
</html>
Comment

PREVIOUS NEXT
Code Example
Html :: how to make an a tag not clickable 
Html :: strikethrough code 
Html :: html img onclick 
Html :: navbar horizontal in html 
Html :: eslint ignore v-html 
Html :: html tables 
Html :: autocomplete off not working in chrome 
Html :: col md flex column 
Html :: how to insert code in html 
Html :: how to add an input next to each other 
Html :: input email tag 
Html :: html5 input pattern name 
Html :: beautify html code in vscode 
Html :: pdf to html 
Html :: bootstrap login 
Html :: how to put a name on a fieldset 
Html :: how to stop marquee text in html when you hover over it 
Html :: the function tag in js 
Html :: how to use an html div by name in jquery 
Html :: html table cell color based on value 
Html :: html get user screen resolution 
Html :: which text is used to create text animations in html 
Html :: HTML <article Element 
Html :: link in html 
Html :: script attach in html 
Html :: input type email 
Html :: how to call html.action in asp.net core 
Html :: height 100% tailwind 
Html :: how to make a paragraph in html 
Html :: html popup form 
ADD CONTENT
Topic
Content
Source link
Name
6+3 =