<!DOCTYPE html>
<html>
<head> <meta charset="utf-8">
<title></title>
<style>
.box={ width:400px; border-bottom:1px solid #ccc; margin:100px auto; }
.box input{ width:370px; height:30px; border:0; outline:none; }
</style>
</head>
<body> <div class="box">
<input type="password" id="psw"> <lable>
<img src="./btn1.PNG" id="eye"> </lable>
<script> var psw=document.getElementById("psw");
var eye=document.getElementById("eye"); var flag=0;
eye.onclick=function(){ if(flag==0) {psw.type="text"; eye.src="./btn1.PNG"; flag=1; }else{ psw.type="password"; eye.src="./btn2.PNG"; flag=0; } } </script> </div> </body></html>
03-07
09-15
09-15
09-15