0
I'll like to know how to set password, so when clicked the password would be visible.
JS
2 odpowiedzi
+ 1
Thanks 🤗
0
<body>
  <input id="pwd" type="password" />  
  <button id="show">show</button>
  <script>
   show.onclick=()=>{
     pwd.type =
       pwd.type=="password"?
       "text":"password";
     show.textContent = 
       show.textContent=="show" ?
       "hide":"show";
   }
  </script>
</body>



