|
<%@ page language="java" contentType="text/HTML; charset=GBK"
pageEncoding="GBK"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>登陆首页</title>
<meta http-equiv="Content-Type" content="text/html; charset=GBK">
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<style type="text/css">
.style3 {font-size: 18px; font-weight: bold; color:#003366 }
.style5 {font-size: 15px; font-weight: bold; color:#003366 }
.style7 {font-size: 14px; color:#003366}
.style8 {font-size: 14}
</style>
<script language="javascript" type="text/javascript">
function Login()
{
var name = document.getElementById("name").value;
var password = document.getElementById("password").value;
if(name=="")
{
alert("用户名不能为空!");
return false;
}
if(password=="")
{
alert("密码不能为空!");
return false;
}
if(name=="duan"&&password=="1"){
var UserName="duan";
window.location.href="<%=path %>/syncConfig.jsp?UserName="+UserName;
return true;
}
if(name=="lin"&&password=="1"){
var UserName="lin";
url="<%=path %>/syncConfig.jsp?UserName="+UserName;
document.form1.action=url;
document.form1.submit();
return true;
}
else{
alert("用户名或密码错误!请从新登陆。");
return false;
}
}
</script>
</head>
<body>
<form id="form1" name="form1" method="post" action="" >
<table width="370" border="1" align="center" cellpadding="0" cellspacing="1" bordercolor="#a2c2ff">
<tr bgcolor="#92b2ff">
<td height="24" colspan="2" align="center" class="style3">用户登陆</td>
</tr>
<tr bgcolor="#a2c2ff">
<td width="104" class="style5">用户名:</td>
<td width="263"><label>
<input type="text" name="name" id="name" size="30" />
</label></td>
</tr>
<tr bgcolor="#a2c2ff">
<td class="style5">密 码:</td>
<td><input type="text" name="password" id="password" size="30"/></td>
</tr>
<tr>
<td colspan="2" align="center" bgcolor="#a2c2ff">
<input type="button" name="queding" id="queding" value="确定" onclick="Login()"/>
<input type="reset" name="chongzhi" id="chongzhi" value="重置" />
<input type="button" name="quxiao" id="quxiao" value="取消" onclick="closeWindows()"/>
</td>
</tr>
</table>
</form>
</body>
<script type="text/javascript" language="javascript">
function closeWindows(){
window.close();
}
</script>
</html> |
|