87b2e63f6114acaf355016be1080772ea5c496f1.svn-base 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html;charset=utf-8">
  5. <title>QUI网页界面集成框架JAVA示例版</title>
  6. <link href="../../system/login/skin_flat/style.css" rel="stylesheet" type="text/css" id="skin"/>
  7. <script type="text/javascript" src="../../libs/js/jquery.js"></script>
  8. <script type="text/javascript" src="../../libs/js/login.js"></script>
  9. <!--居中显示start-->
  10. <script type="text/javascript" src="../../libs/js/method/center-plugin.js"></script>
  11. <!--居中显示end-->
  12. <style>
  13. /*提示信息*/
  14. #cursorMessageDiv {
  15. position: absolute;
  16. z-index: 99999;
  17. border: solid 1px #cc9933;
  18. background: #ffffcc;
  19. padding: 2px;
  20. margin: 0px;
  21. display: none;
  22. line-height:150%;
  23. }
  24. /*提示信息*/
  25. .white{
  26. color:#ffffff;
  27. }
  28. .white a{
  29. color:#ffffff;
  30. text-decoration:underline;
  31. }
  32. .white a:hover{
  33. color:#ffffff;
  34. text-decoration:underline;
  35. }
  36. </style>
  37. </head>
  38. <body >
  39. <div class="login_main">
  40. <div class="login_top">
  41. </div>
  42. <div class="login_middle">
  43. <div class="login_middleleft"></div>
  44. <div class="login_middlecenter">
  45. <form id="loginForm" action="login.do" class="login_form" method="post">
  46. <div class="login_user"><input type="text" id="username"></div>
  47. <div class="login_pass"><input type="password" id="password"></div>
  48. <div class="clear"></div>
  49. <div class="login_button">
  50. <div class="login_button_left"><input type="button" onclick="login()"/></div>
  51. <div class="login_button_right"><input type="reset" value=""/></div>
  52. <div class="clear"></div>
  53. </div>
  54. </form>
  55. <div class="login_info" style="display:none;">111</div>
  56. <div class="login_info2">测试用户名:guest,密码:123456</div>
  57. </div>
  58. <div class="login_middleright"></div>
  59. <div class="clear"></div>
  60. </div>
  61. <div class="login_bottom">
  62. <div class="login_copyright">
  63. 北京引领视觉科技有限公司出品<br/><br/>
  64. QUI 框架官方网站:<span class="white"><a href="http://www.quickui.net" target="_blank">http://www.quickui.net</a></span>
  65. </div>
  66. </div>
  67. </div>
  68. <script>
  69. $(function(){
  70. //居中
  71. $('.login_main').center();
  72. document.getElementById("username").focus();
  73. $("#username").keydown(function(event){
  74. if(event.keyCode==13){
  75. login()
  76. }
  77. })
  78. $("#password").keydown(function(event){
  79. if(event.keyCode==13){
  80. login()
  81. }
  82. })
  83. })
  84. //登录
  85. function login() {
  86. var errorMsg = "";
  87. var loginName = document.getElementById("username");
  88. var password = document.getElementById("password");
  89. if(!loginName.value){
  90. errorMsg += "&nbsp;&nbsp;用户名不能为空!";
  91. }
  92. if(!password.value){
  93. errorMsg += "&nbsp;&nbsp;密码不能为空!";
  94. }
  95. if(errorMsg != ""){
  96. $(".login_info").html(errorMsg);
  97. $(".login_info").show();
  98. }
  99. else{
  100. $(".login_info").show();
  101. $(".login_info").html("&nbsp;&nbsp;正在登录中...");
  102. //登录处理
  103. $.post("../../login.action",
  104. {"userinfor.userLoginName":loginName.value,"userinfor.userPassword":password.value},
  105. function(result){
  106. if(result == null){
  107. $(".login_info").html("&nbsp;&nbsp;登陆失败!");
  108. return false;
  109. }
  110. if(result.status=="true"||result.status==true){
  111. $(".login_info").html("&nbsp;&nbsp;登录成功,正在转到主页...");
  112. window.location="../../system/layout_flat/main.jsp";
  113. }
  114. else{
  115. $(".login_info").html("&nbsp;&nbsp;"+result.message);
  116. }
  117. },"json");
  118. }
  119. }
  120. </script>
  121. </body>
  122. </html>