Browse Source

enter 登录

oyq28 1 year ago
parent
commit
a77891e036
1 changed files with 7 additions and 1 deletions
  1. 7 1
      src/main/resources/static/admin/lyear_pages_login.html

+ 7 - 1
src/main/resources/static/admin/lyear_pages_login.html

@@ -105,7 +105,7 @@
         </div>
         -->
         <div class="form-group">
-          <button class="btn btn-block btn-primary" type="button" onclick="login()">立即登录</button>
+          <button class="btn btn-block btn-primary" type="button" onclick="login()" >立即登录</button>
         </div>
       </form>
       <hr>
@@ -147,6 +147,12 @@
     });
     ;
   }
+  $(window).keydown(function (event) {
+    //如果按的是回车键,则提交登录请求
+    if (event.keyCode==13){
+      login();
+    }
+  })
 </script>
 </body>
 </html>