| | |
| | | |
| | | #main { |
| | | width: 472px; |
| | | height: 570px; |
| | | height: 490px; |
| | | position: absolute; |
| | | background: hsla(0,0%,100%,.9); |
| | | border-radius: 8px; |
| | | margin-left: 62%; |
| | | margin-top: 10%; |
| | | margin-top: 12%; |
| | | z-index: 2; |
| | | } |
| | | |
| | |
| | | .main_txt { |
| | | width: 100%; |
| | | height: 41px; |
| | | background-color: grey; |
| | | background-color: lightgrey; |
| | | border-radius: 5px; |
| | | vertical-align: central; |
| | | padding-left: 5px; |
| | | box-sizing: border-box; |
| | | } |
| | | |
| | | .main_txt img { |
| | | padding: 0 5px 0 5px; |
| | | padding-left: 3px; |
| | | padding-right: 5px; |
| | | vertical-align: text-bottom; |
| | | } |
| | | |
| | | .main_txt input { |
| | | height: 41px; |
| | | width: 341px; |
| | | width: 338px; |
| | | border: none; |
| | | font-size: 15px; |
| | | border-radius: 5px; |
| | | font-size: 18px; |
| | | padding-left: 15px; |
| | | background-color: rgb(250, 255, 189); |
| | | } |
| | | |
| | | .main_txt input:focus { |
| | | outline: 0; |
| | | } |
| | | |
| | | #checkCode { |
| | | font-style: italic; |
| | | color: blue; |
| | | font-size: 30px; |
| | | float: right; |
| | | cursor: pointer; |
| | | margin-right: 30px; |
| | | } |
| | | |
| | | #btnLogin { |
| | | width: 100%; |
| | | background: rgb(59, 77, 110); |
| | | color: white; |
| | | cursor: pointer; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | .world { |
| | | position: absolute; |
| | |
| | | cursor: move; |
| | | cursor: -moz-grab; |
| | | cursor: -webkit-grab; |
| | | cursor: grab; |
| | | } |
| | | |
| | | .world-bg { |
| | |
| | | <script src="../js/login.js"></script> |
| | | <script> |
| | | $(function () { |
| | | //createCode(); |
| | | //getPublicKey(); |
| | | //document.getElementById('inputCode').focus(); |
| | | createCode(); |
| | | getPublicKey(); |
| | | document.getElementById('password').focus(); |
| | | }); |
| | | </script> |
| | | </head> |
| | |
| | | </div> |
| | | <form class="main_form"> |
| | | <div class="main_txt"> |
| | | <img src="../images/login/user.png" alt="" /> |
| | | <input type="text" value="admin" maxlength="30" placeholder="请输入用户名" /> |
| | | <img src="../images/login/user.png" alt="" /> |
| | | <input id="username" type="text" value="admin" maxlength="30" placeholder="请输入用户名" /> |
| | | </div> |
| | | |
| | | <div class="main_txt" style="margin-top: 48px;"> |
| | | <img src="../images/login/pwd.png" alt="" /> |
| | | <input type="password" maxlength="30" value="" placeholder="请输入密码" /> |
| | | <input id="password" type="password" maxlength="30" value="" placeholder="请输入密码" /> |
| | | </div> |
| | | |
| | | <div class="main_txt" style="margin-top: 48px; width: 256px !important;"> |
| | | <div class="main_txt" style="margin-top: 48px;"> |
| | | <img src="../images/login/code.png" alt="" /> |
| | | <input type="text" value="" maxlength="8" style="width: 221px;" placeholder="请输入验证码" /> |
| | | <input id="inputCode" type="text" value="" maxlength="4" style="width: 218px;" placeholder="请输入验证码" /> |
| | | <div id="checkCode" onclick="createCode()"></div> |
| | | </div> |
| | | |
| | | <div class="main_txt" style="margin-top: 48px; padding: 0;"> |
| | | <input id="btnLogin" type="button" value="登 录" onclick="sysLogin();" /> |
| | | </div> |
| | | </form> |
| | | </div> |
| | |
| | | |
| | | // 创建验证码 |
| | | function createCode() { |
| | | var codeLength = 4; // 验证码的长度 |
| | | var codeLength = 4, code = ""; // 验证码的长度 |
| | | var checkCode = document.getElementById("checkCode"); |
| | | |
| | | var codeChars = new Array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9); |
| | |
| | | code += codeChars[charNum]; |
| | | } |
| | | if (checkCode) { |
| | | checkCode.className = "code"; |
| | | checkCode.innerHTML = code; |
| | | } |
| | | } |