inputLogicalcode.html 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. <!DOCTYPE html>
  2. <html class="remModel">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta http-equiv="Content-Type" content="application/xhtml+xml;charset=UTF-8">
  6. <meta http-equiv="Cache-Control" content="no-cache,no-store,must-revalidate">
  7. <meta http-equiv="pragma" content="no-cache">
  8. <meta http-equiv="expires" content="0">
  9. <meta name="format-detection" content="telephone=no,email=no">
  10. <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no">
  11. <title>输入编号使用设备</title>
  12. <style>
  13. html {
  14. width: 100%;
  15. height: 100%;
  16. }
  17. body {
  18. width: 100%;
  19. height: 100%;
  20. margin: 0;
  21. color: #fff;
  22. background-image: linear-gradient(to top, #48c6ef 0%, #6f86d6 100%);
  23. }
  24. .form {
  25. position: fixed;
  26. top: 50%;
  27. left: 50%;
  28. transform: translateX(-50%) translateY(-50%);
  29. }
  30. input {
  31. padding: 12px 10px;
  32. box-sizing: content-box;
  33. font-size: 18px;
  34. border: 1px solid #fff;
  35. border-radius: 4px;
  36. color: #333;
  37. }
  38. .ok {
  39. color: #fff;
  40. text-decoration: none;
  41. border: 1px solid #fff;
  42. line-height: 38px;
  43. border-radius: 20px;
  44. padding: 0 20px;
  45. white-space: nowrap;
  46. width: 80px;
  47. text-align: center;
  48. margin: 20px auto;
  49. }
  50. </style>
  51. </head>
  52. <body class="">
  53. <div class="form">
  54. <input placeholder="设备编号" id="logicalCode" maxlength="20"/>
  55. <input placeholder="端口(非必填)" id="chargeIndex" maxlength="20" style="margin-top: 15px"/>
  56. <div class="ok" onclick="goPage()">确定</div>
  57. </div>
  58. <script>
  59. function goPage() {
  60. var logicalCode = document.getElementById('logicalCode').value
  61. var chargeIndex = document.getElementById('chargeIndex').value
  62. if (logicalCode) {
  63. location.href = "/userLogin?l=" + logicalCode + "&chargeIndex=" + chargeIndex
  64. }
  65. }
  66. </script>
  67. </body>
  68. </html>