login.jsp
来自「使用JSP和Java Bean来构建一个网上书店。本章介绍的例子可以分成两大部分」· JSP 代码 · 共 53 行
JSP
53 行
<%@ page contentType="text/html;charset=utf-8"%>
<%@ include file="../include.jsp"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title></title>
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<div id="Content">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<script>
var result = <%=adminMgr.adminLogin(request,response)%>;
var theP = parent;
if ( result==1 )
{
theP.document.getElementById("logining_info").innerHTML = "帐号或密码不正确";
theP.document.getElementById("logining_info").className = "ErrorMsg";
theP.document.getElementById("logining_info").value = "";
theP.document.getElementById("licenceImg").src="<%=ConfigBean.getStringValue("systenFolder")%>loginLicence";
}
else if ( result==2 )
{
theP.document.getElementById("logining_info").innerHTML = "验证码不正确";
theP.document.getElementById("logining_info").className = "ErrorMsg";
theP.document.getElementById("logining_info").value = "";
theP.document.getElementById("licenceImg").src="<%=ConfigBean.getStringValue("systenFolder")%>loginLicence";
}
else if ( result==3 )
{
theP.document.getElementById("logining_info").innerHTML = "帐号被屏蔽";
theP.document.getElementById("logining_info").className = "ErrorMsg";
}
else if ( result==0 )
{
theP.document.getElementById("logining_info").innerHTML = "验证通过,正在登陆…";
theP.document.getElementById("logining_info").className = "OkMsg";
theP.location = "../administrator";
}
else
{
theP.document.getElementById("logining_info").innerHTML = "未知错误";
theP.document.getElementById("logining_info").className = "ErrorMsg";
}
</script>
</td>
</tr>
</table>
</div>
</body>
</html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?