15832144755
2021-08-27 3516f02277035cdc7ff137422709b16efe97ca4a
src/main/webapp/hxzk/login.jsp
@@ -70,7 +70,7 @@
                           <svg t="1618403857453" class="feather feather-lock" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2231" width="24" height="24"><path d="M895.744 273.28a59.2 59.2 0 0 0-46.72-51.936A1103.36 1103.36 0 0 1 697.92 186.56a561.28 561.28 0 0 1-135.008-78.912 61.76 61.76 0 0 0-72.16 0 354.112 354.112 0 0 1-136.032 78.4 507.264 507.264 0 0 1-146.944 36.32 55.04 55.04 0 0 0-46.208 51.936S160 404.64 160 519.36C160 727.04 405.056 928 527.616 928c122.528 0 330.24-141.76 363.456-405.504 8.32-155.776 2.56-248.704 2.56-248.704l2.112-0.544z m-133.44 160.416l-256 241.44c-11.52 10.976-29.12 12.704-42.56 4.16l-6.72-5.728-141.248-146.912a35.264 35.264 0 0 1 51.904-47.776l116.32 122.016 230.528-218.08a35.264 35.264 0 1 1 47.776 51.936v-1.056z" p-id="2232" fill="#bfbfbf"></path></svg>                                   
                           <input id="yanzheng" name="yanzheng" type="text" class="form-control" placeholder="验证码" style ="width:40%;float:left;">
<!--                          <input type="button"  onclick="createCode()" id="code"  style ="margin-left:10px;width:40%;height:46.8px;font-family:Arial;font-style:italic;font-weight:bold;border:0;letter-spacing:2px;color:blue;"/>  -->
                           <button onclick="createCode()" id="code" style ="margin-left:10px;width:40%;height:46.8px;font-family:Arial;font-style:italic;font-weight:bold;border-radius:10px;border:0;letter-spacing:2px;color:blue;"></button>
                           <button type="button" onclick="shuaxin()" id="code" style ="margin-left:10px;width:40%;height:46.8px;font-family:Arial;font-style:italic;font-weight:bold;border-radius:10px;border:0;letter-spacing:2px;color:blue;"></button>
                                                              
                                </div>
                                <div class="d-sm-flex justify-content-between">
@@ -97,12 +97,27 @@
       code = ""; 
       var codeLength = 4;//验证码的长度
       var checkCode = document.getElementById("code"); 
       var random = new Array(0,1,2,3,4,5,6,7,8,9,'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R',
       'S','T','U','V','W','X','Y','Z');//随机数
       var random = new Array(0,1,2,3,4,5,6,7,8,9);//随机数
       for(var i = 0; i < codeLength; i++) {//循环操作
         var index = Math.floor(Math.random()*36);//取得随机数的索引(0~35)
         var index = Math.floor(Math.random()*10);//取得随机数的索引(0~35)
         code += random[index];//根据索引取得随机数加到code上
      }
      var aaa = document.getElementById("yanzheng")
      aaa.value = code
      checkCode.innerHTML = code;//把code值赋给验证码
   }
   //刷新验证码
   function shuaxin () {
      code = "";
       var codeLength = 4;//验证码的长度
       var checkCode = document.getElementById("code");
       var random = new Array(0,1,2,3,4,5,6,7,8,9);//随机数
       for(var i = 0; i < codeLength; i++) {//循环操作
         var index = Math.floor(Math.random()*10);//取得随机数的索引(0~35)
         code += random[index];//根据索引取得随机数加到code上
      }
      var aaa = document.getElementById("yanzheng")
      aaa.value = code
      checkCode.innerHTML = code;//把code值赋给验证码
   }
   //校验验证码