⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 login.jsp

📁 使用JSP和Java Bean来构建一个网上书店。本章介绍的例子可以分成两大部分
💻 JSP
字号:
<%@ 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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -