From c4a55e708109402835cb00991eacab9e97c32d5e Mon Sep 17 00:00:00 2001 From: luxiaotao1123 <t1341870251@163.com> Date: 星期五, 10 七月 2020 13:25:37 +0800 Subject: [PATCH] # --- src/main/webapp/views/pdaCe/login.html | 29 ++++++++++++++++++++++++----- 1 files changed, 24 insertions(+), 5 deletions(-) diff --git a/src/main/webapp/views/pdaCe/login.html b/src/main/webapp/views/pdaCe/login.html index 7b4c54e..2a452bc 100644 --- a/src/main/webapp/views/pdaCe/login.html +++ b/src/main/webapp/views/pdaCe/login.html @@ -6,6 +6,17 @@ <title>绯荤粺鐧诲綍</title> <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> <style> + html { + background-color: #fff; + } + body { + text-align: center; + padding: 10px 30px; + } + .login-form { + text-align: left; + } + .login-form input { display: block; } @@ -15,18 +26,18 @@ </style> </head> <body> - <h1>涓壃鐗╂祦</h1> + <h2>涓壃鐗╂祦</h2> <div class="login-form"> <div> <span>璐﹀彿</span> <input type="text" id="mobile" value="super"> </div> - <div> + <div style="margin-top: 5px"> <span>瀵嗙爜</span> <input type="password" id="password" value="xltys1995"> </div> - <div> - <button id="login" onclick="login()">鐧诲綍</button> + <div style="margin-top: 8px;height: 20px;"> + <button id="login" onclick="login()" style="padding: 5px 3px 0 3px">鐧诲綍</button> </div> </div> @@ -34,7 +45,7 @@ <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> <script type="text/javascript" src="../../static/js/tools/md5.js"></script> <script type="text/javascript"> - document.onkeydown = function (e) { + document.onkeyup = function (e) { if (window.event)//濡傛灉window.event瀵硅薄瀛樺湪锛屽氨浠ユ浜嬩欢瀵硅薄涓哄噯 e = window.event; var code = e.charCode || e.keyCode; @@ -42,6 +53,14 @@ login() } } + document.onkeydown = function (e) { + if (window.event)//濡傛灉window.event瀵硅薄瀛樺湪锛屽氨浠ユ浜嬩欢瀵硅薄涓哄噯 + e = window.event; + var code = e.charCode || e.keyCode; + if (code === 13) { + document.getElementById("login"); + } + } function login(){ httpRequest({ httpUrl: baseUrl+"/login.action", -- Gitblit v1.9.1