main.jsp 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <%@ page language="java" contentType="text/html; charset=UTF-8"
  2. pageEncoding="UTF-8"%>
  3. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  4. <html>
  5. <head>
  6. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  7. <title>后台</title>
  8. <script type="text/javascript" src="js/jquery.js"></script>
  9. <link rel="stylesheet" href="css/add.css" type="text/css" media="screen" />
  10. <link rel="stylesheet" href="css/bootstrap.min.css" type="text/css" media="screen" />
  11. </head>
  12. <body>
  13. <div class="div_from_aoto" style="width: 500px;">
  14. <FORM action="user?type=1" method="post">
  15. <DIV class="control-group">
  16. <label class="laber_from">用户名</label>
  17. <DIV class="controls" ><INPUT class="input_from" name="name" type=text placeholder=" 请输入用户名"><P class=help-block></P></DIV>
  18. </DIV>
  19. <DIV class="control-group">
  20. <LABEL class="laber_from">密码</LABEL>
  21. <DIV class="controls" ><INPUT class="input_from" name="pwd" type=text placeholder=" 请输入密码"><P class=help-block></P></DIV>
  22. </DIV>
  23. <DIV class="control-group">
  24. <LABEL class="laber_from">权限</LABEL>
  25. <DIV class="controls" >
  26. <SELECT class="input_select" name="state">
  27. <OPTION value="1">普通用户</OPTION>
  28. <OPTION value="0" selected="selected">超级管理</OPTION>
  29. </SELECT>
  30. </DIV>
  31. </DIV>
  32. <DIV class="control-group">
  33. <LABEL class="laber_from" ></LABEL>
  34. <DIV class="controls" >
  35. <button type="submit" class="btn btn-primary" style="width:96px;" >登陆</button>
  36. <button type="reset" class="btn btn-primary" style="width:96px;" >重置</button>
  37. </DIV>
  38. </DIV>
  39. </FORM>
  40. </div>
  41. </body>
  42. <script type="text/javascript">
  43. var aQuery = window.location.href.split("?");//取?后面的参数
  44. var aQuery1 = window.location.href.split("html");//取html后面的参数
  45. var aGET = new Array();
  46. if(aQuery.length > 1){
  47. var aBuf = aQuery[1].split("&");
  48. for(var i=0, iLoop = aBuf.length; i<iLoop; i++){
  49. var aTmp = aBuf[i].split("=");//分离key与Value
  50. aGET[aTmp[0]] = aTmp[1];
  51. }
  52. }
  53. var msg = aGET['msg'];
  54. if(msg!=undefined && msg=="1"){
  55. alert("账号密码错误!");
  56. }
  57. </script>
  58. </html>