yangrenwei 3 years ago
parent
commit
bcf91a698f
2 changed files with 13 additions and 4 deletions
  1. 1 1
      src/main/webapp/loginPage.html
  2. 12 3
      src/main/webapp/register.html

+ 1 - 1
src/main/webapp/loginPage.html

@@ -33,7 +33,7 @@
                     <div class="password">
 
                         <div class="checkPassword">
-                            <input type="checkbox" id="btn" onclick="xs()">
+                            <input type="checkbox" onclick="xs()">
                             <p>显示密码</p>
                         </div>
 

+ 12 - 3
src/main/webapp/register.html

@@ -37,7 +37,7 @@
 
                 <div class="secBox">
                     <div class="passWord">
-                        <input type="password" placeholder="密码">
+                        <input type="password" id="pass" placeholder="密码">
                     </div>
                     <div class="warning">使用 8 个或更多字符(字母、数字和符号的组合)</div>
                 </div>
@@ -46,7 +46,7 @@
             </div>
 
             <div class="checkPassword">
-                <input type="checkbox">
+                <input type="checkbox" onclick="xs()">
                 <p>显示密码</p>
             </div>
 
@@ -77,5 +77,14 @@
 
 
 </body>
-
+<script>
+    function xs(){
+        var a = document.getElementById("pass");
+        if (a.type=="password"){
+            a.type = "text"
+        }else {
+            a.type = "password"
+        }
+    }
+</script>
 </html>