|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Pragma" content="no-cache" />
<meta http-equiv="Cache-Control" content="no-cache" />
<meta http-equiv="Expires" content="-1" />
<title>xxxxx后台管理系统</title>
<script type="text/javascript" src="background/js/jquery-1.4.4.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
var height = document.documentElement.clientHeight;
var width = document.documentElement.clientWidth;
$("#beijin").css("height",height);
var loginbjH = (height - 493)/2;
var loginbjW = (width - 560 )/2;
$("#loginP").css("margin-top",loginbjH);
$("#submit").click(function(){
login();
})
//jquery绑定回车事件
$(':input').bind('keyup',function(event){
if(event.keyCode == "13"){
$("#submit").click();
}
});
//按钮鼠标事件
$("#submit").mouseover(this,function(){
$("#submit").attr("src","background/images/login/dl-005.gif");
})
$("#submit").mouseout(this,function(){
$("#submit").attr("src","background/images/login/dl-003.gif");
})
$("#submit").mousedown(this,function(){
$("#submit").attr("src","background/images/login/dl-007.gif");
})
$("#reset").mouseover(this,function(){
$("#reset").attr("src","background/images/login/dl-006.gif");
})
$("#reset").mouseout(this,function(){
$("#reset").attr("src","background/images/login/dl-004.gif");
})
$("#reset").mousedown(this,function(){
$("#reset").attr("src","background/images/login/dl-008.gif");
$("input[name='userID']").val(""),
$("input[name='userPwd']").val(""),
$("input[name='randomStr']").val("")
})
//窗体事件
$(window).resize(function(){
var height = document.documentElement.clientHeight;
var width = document.documentElement.clientWidth;
$("#beijin").css("height",height);
var loginbjH = (height - 493)/2;
var loginbjW = (width - 560 )/2;
$("#loginP").css("margin-top",loginbjH);
});
png();
})
function login(){
$.post("loginAction.action",
{
userID : $("input[name='userID']").val(),
userPwd : $("input[name='userPwd']").val(),
randomStr : $("input[name='randomStr']").val()
},
function(data){
if(data.info == "登陆成功!"){
window.location.href ="background/main.jsp";
} else if(data.info == "验证码错误!"){
$("#info").html(data.info);
$("#randomPicture").click();//验证码错误,重新请求
}else{
$("#info").html(data.info);
$("#randomPicture").click();
}
}
)
}
function changeValidateCode(obj) {
var currentTime= new Date().getTime();
obj.src = "randomPictureAction.action?d=" + currentTime;
}
function png(){
var browser=navigator.appName;
var browser=navigator.appName
var b_version=navigator.appVersion
var version=b_version.split(";");
var trim_Version=version[1].replace(/[ ]/g,"");
if(browser=="Microsoft Internet Explorer" && trim_Version=="MSIE6.0"){
$(".png").each(function(){
$(this).css("filter", "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + $(this).attr('src') + "', sizingMethod='scale')").attr("src", "background/images/login/1.gif");
})
}
}
</script>
<style type="text/css">
</style>
</head>
<body style="margin:0 auto; text-align:center; overflow:inherit;">
<div id="beijin" style="background-image:url(background/images/login/dl-001.gif); background-repeat:repeat; border:1px solid" >
<div id="loginP" style="margin:auto; text-align:center; z-index:1;">
<img class="png" src="background/images/login/dl-002.png" width="559" height="493" />
<div id="loginTxtDiv" style=" width:559px;height:496px; z-index:2; margin:0 auto; margin-top:-493px">
<table width="60%" style="margin-top:100px; color: #5A5A5A; font-weight:600; margin:auto; margin-top:240px;">
<tr >
<td width="25%" style="text-align:right;solid;font-family:'宋体';">用户名:</td>
<td style="text-align:left"><input type="text" name="userID" size="20" style="width:150px" /></td>
</tr>
<tr>
<td width="25%" style=" solid;font-family:'宋体';white-space:pre; text-align:right">密 码:</td>
<td style="text-align:left"><input type="password" name="userPwd" size="20" style="width:150px"/></td>
</tr>
<tr>
<td width="25%" style="text-align:right;solid;font-family:'宋体';">验证码:</td>
<td style="text-align:left"><input type="text" name="randomStr" size="8" />
<img id="randomPicture" src="randomPictureAction.action" width="63px" height="18px" onclick="changeValidateCode(this)" style=" margin-bottom:-4px;" />
</td>
</tr>
<tr>
<td colspan="2" style="color: #54163D;solid;font-family:'宋体'; font-size:12px; text-align:left;">
<span id="info"></span>
</td>
</tr>
<tr>
<td colspan="2" style="text-align:center; margin:0 auto;">
<img src="background/images/login/dl-003.gif" id="submit"/>
<img src="background/images/login/dl-004.gif" id="reset"/>
</td>
</tr>
</table>
</div>
</div>
</div>
</body>
</html>
|
|