123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140 |
- <%@ page language="java" pageEncoding="UTF-8"%>
- <%
- String path = request.getContextPath();
- String url =request.getParameter("goto");
- %>
- <%
- response.setHeader("Pragma","No-cache");
- response.setHeader("Cache-Control","no-cache");
- response.setDateHeader("Expires", 0);
- %>
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
- <html>
- <head>
- <title>系统登录界面</title>
- <script type="text/javascript" src="<%=path %>/js/jquery/jquery-1.7.2.min.js"></script>
- <style type="text/css">
- body {
- font: normal 11px "Trebuchet MS", Verdana, Arial, Helvetica,sans-serif;
- color: #4f6b72;/*background: #E6EAE9;*/
- }
- table {
- margin-top: 10%;
- margin-left: 30%;
- border: 1px solid #CCCCFF;
- }
- table td {
- border: 0px solid #CCCCFF;
- font: bold 12px "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;
- color: #000000;
- }
- table input {
- width: 180px;
- }
- .leftTd {
- text-align: right;
- width: 35%;
- }
- .centerTd {
- text-align: center;
- font: bold 18px "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;
- color: #000000;
- }
- .rightTd {
- text-align: left;
- width: 65%;
- }
- #btn_ok{
- width: 50px;
- }
- #btn_clear{
- width: 50px;
- }
- a{
- margin:30px;
- }
- </style>
- <script type="text/javascript">
- $(function(){
- $("#btn_reload").bind("click",function(){
- btn_reload();
- });
- $("#btn_clear").bind("click",function(){
- btn_clear();
- });
- $("#btn_ok").bind("click",function(){
- btn_ok();
- });
- });
- function btn_ok(){
- console.log("点击登录1")
- var result =validateform();
- if(!result){
- return ;
- }
- $("#form").attr("action","/SSOAuth/AuthServlet.do");
- $("#form").submit();
- }
- function btn_reload(){
- $("#image").removeAttr("src");
- $("#image").attr("src", "<%=path%>/image.jsp?random()*1000");
- }
- function btn_clear(){
- $(":input").not("input[type=button]").each(function(){
- $(this).val("");
- });
- }
- function validateform(){
- var result =true;
- $(":input").not("input[type=button]").each(function(){
- if($(this).val() ==""){
- result=false;
- }
- });
- return result ;
- }
- </script>
- </head>
- <body>
- <form id="form" action="login.jsp" method="post">
- <table>
- <tbody>
- <tr>
- <td colspan="99" class="centerTd">用户信息登录 </td>
- </tr>
- <tr>
- <td class="leftTd"><label>用户名</label></td>
- <td class="rightTd"><input type="text" name="username" /></td>
- </tr>
- <tr>
- <td class="leftTd"><label>密码</label></td>
- <td class="rightTd"><input type="password" name="userpassword" /></td>
- </tr>
- <tr>
- <td class="leftTd"><label>验证码</label></td>
- <td class="rightTd"><input type="text" name="checkcode" />
- <img src="<%=path%>/image.jsp"id="image" />
- </td>
- </tr>
- <tr >
- <td class="leftTd"><input type="button" id="btn_ok" value="登录" /></td>
- <td class="rightTd"><input type="button" id="btn_clear" value="重置" />
-
- <a href ="javascript:void(0);" id="btn_reload">看不清,换一张</a>
- </td>
- </tr>
- </tbody>
- </table>
- <input name="goto" type="hidden" value=<%=url%>/>
- </form>
- </body>
- </html>
|