login.html 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>Title</title>
  6. <!-- Bootstrap core CSS -->
  7. <link href="{{ url_for('static',filename='css/bootstrap.min.css') }}" rel="stylesheet">
  8. <!-- Custom styles for this template -->
  9. <link href="{{ url_for('static',filename='css/dashboard.css') }}" rel="stylesheet">
  10. </head>
  11. <body>
  12. <div class="container">
  13. <div class="row clearfix">
  14. <div class="col-md-12 column">
  15. <form id="formSubmit" class="form-horizontal" role="form" method="post">
  16. <div class="form-group">
  17. <label for="inputEmail3" class="col-sm-2 control-label">用户名</label>
  18. <div class="col-sm-10">
  19. <input type="text" class="form-control" id="inputEmail3" name="user"/>
  20. </div>
  21. </div>
  22. <div class="form-group">
  23. <label for="inputPassword3" class="col-sm-2 control-label">密码</label>
  24. <div class="col-sm-10">
  25. <input type="password" class="form-control" id="inputPassword3" name="pwd"/>
  26. </div>
  27. </div>
  28. <div class="form-group">
  29. </div>
  30. <div class="form-group">
  31. <div class="col-sm-offset-2 col-sm-10">
  32. <button type="submit" class="btn btn-default">登录</button>
  33. </div>
  34. </div>
  35. </form>
  36. <div class="col-sm-offset-2 col-sm-10">
  37. <div class="checkbox">
  38. <button id="change" type="button" class="btn btn-default">其他登录方式</button>
  39. </div>
  40. </div>
  41. </div>
  42. </div>
  43. </div>
  44. </body>
  45. <script src="{{ url_for('static',filename='js/jquery.min.js') }}"></script>
  46. <script>window.jQuery || document.write('<script src="static/js/jquery.min.js"><\/script>')</script>
  47. <script src="{{ url_for('static',filename='js/bootstrap.min.js') }}"></script>
  48. <script>
  49. var sts = 0;
  50. $("#change").click(function (){
  51. if (sts == 1){
  52. $("#formSubmit").html("<div class=\"form-group\">\n" +
  53. "\t\t\t\t\t <label for=\"inputEmail3\" class=\"col-sm-2 control-label\">用户名</label>\n" +
  54. "\t\t\t\t\t<div class=\"col-sm-10\">\n" +
  55. "\t\t\t\t\t\t<input type=\"text\" class=\"form-control\" id=\"inputEmail3\" name=\"user\"/>\n" +
  56. "\t\t\t\t\t</div>\n" +
  57. "\t\t\t\t</div>\n" +
  58. "\t\t\t\t<div class=\"form-group\">\n" +
  59. "\t\t\t\t\t <label for=\"inputPassword3\" class=\"col-sm-2 control-label\">密码</label>\n" +
  60. "\t\t\t\t\t<div class=\"col-sm-10\">\n" +
  61. "\t\t\t\t\t\t<input type=\"password\" class=\"form-control\" id=\"inputPassword3\" name=\"pwd\"/>\n" +
  62. "\t\t\t\t\t</div>\n" +
  63. "\t\t\t\t</div>\n" +
  64. "\t\t\t\t<div class=\"form-group\">\n" +
  65. "\t\t\t\t\t<div class=\"col-sm-offset-2 col-sm-10\">\n" +
  66. "\t\t\t\t\t\t <button type=\"submit\" class=\"btn btn-default\">登录</button>\n" +
  67. "\t\t\t\t\t</div>\n" +
  68. "\t\t\t\t</div>")
  69. sts = 0
  70. }
  71. else{
  72. $("#formSubmit").html("<div class=\"form-group\">\n" +
  73. "\t\t\t\t\t <label for=\"inputEmail3\" class=\"col-sm-2 control-label\">用户名</label>\n" +
  74. "\t\t\t\t\t<div class=\"col-sm-10\">\n" +
  75. "\t\t\t\t\t\t<input type=\"text\" class=\"form-control\" id=\"inputEmail3\" name=\"user\"/>\n" +
  76. "\t\t\t\t\t</div>\n" +
  77. "\t\t\t\t</div>\n" +
  78. "\t\t\t\t<div class=\"form-group\">\n" +
  79. "\t\t\t\t\t <label for=\"inputPassword3\" class=\"col-sm-2 control-label\">cookie</label>\n" +
  80. "\t\t\t\t\t<div class=\"col-sm-10\">\n" +
  81. "\t\t\t\t\t\t<input type=\"password\" class=\"form-control\" id=\"inputPassword3\" placeholder=\"7de7ce62-e02f-4f9e-bcec-03b9084e890d\" name=\"cookie\"/>\n" +
  82. "\t\t\t\t\t</div>\n" +
  83. "\t\t\t\t</div>\n" +
  84. "\t\t\t\t<div class=\"form-group\">\n" +
  85. "\t\t\t\t\t<div class=\"col-sm-offset-2 col-sm-10\">\n" +
  86. "\t\t\t\t\t\t <button type=\"submit\" class=\"btn btn-default\">登录</button>\n" +
  87. "\t\t\t\t\t</div>\n" +
  88. "\t\t\t\t</div>")
  89. sts = 1
  90. }
  91. })
  92. </script>
  93. </html>