Aapka Apna blog jo kre apki problem Solve

www.technicaldestination.blogspot.com

This website helps you to solve hacking problems

www.technicaldestination.blogspot.com

My blog help to users to solve hacking and programming errors.

www.technicaldestination.blogspot.com

if you see hacking news then follow me on instagram facebook blogger and youtube.

Showing posts with label Show and hide password using JavaScript. Show all posts
Showing posts with label Show and hide password using JavaScript. Show all posts

Friday, 12 July 2019

Show and hide password using JavaScript



Show and hide password using JavaScript





 <!DOCTYPE html>

 <html>

 <head>

  <title>Password</title>


  <style type="text/css">

 


  body{

  background-color: black;

  }

  h1{

  color:white;

  }


      input[type="checkbox"]{

      width: 30px;

      }

  </style>

 </head>

 <body>

 

   <center>

   

    <h1> Change Password With Javascript</h1>


    <input type="Password" name="" id="show"> <br><br>

    <input type="checkbox" name="" id="pass" onclick="myfun()"> <h1>Show Password</h1>


   </center>


    <script type="text/javascript">

   

    function myfun() {

    var x = document.getElementById('show');


    if (x.type == "password") {

    x.type = "text";

    }

    else{

    x.type = "password";

    }

    }


    </script>

 </body>

 </html>

Share:
loading...