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

📄 login.jsp

📁 新闻发布系统源代码 可以作为网站的模板
💻 JSP
字号:
<%@page contentType="text/html;charset=gb2312"%>
<%@ include file="../incoming/Common.jsp"%>
<%@ include file="../incoming/ConnectDB.jsp"%>
<%
 String loginmsg = request.getParameter("loginmsg");
 request.getSession(true);
 session.putValue("IsLogin","false");
%>
<html>
<head>
<title><%=title%>管理</title>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=gb2312">
<link href="../incoming/style.css" rel="stylesheet" type="text/css">
<script language="JavaScript">
function check_input() 
{
	if( form.username.value.length<1 || form.username.value.length>16 ) 
	{
		alert("请输入用户名.")
		return false;
	}
	if( form.password.value.length<1 || form.password.value.length>16 ) 
	{
		alert("请输入密码.")
		return false;
	}
}
</script>
</head>
<body>
<p>&nbsp;</p>
<table width="320" height="197" border="2" align="center" cellpadding="2" cellspacing="2" bordercolor="#878080">
  <tr>
    <td width="306" height="189"><div align="center">
      <table width="100%" border=0 cellpadding=0 cellspacing=0 background="../images/login_bg.jpg" bgcolor="#FFFFFF" class=bg>
        <form action=ChkLogin.jsp method=post name=form onSubmit="return check_input()">
          <tr>
            <td width="402" height=40 align=left bgcolor="#CCCCCC"><div align="center"><a class="title"><%=title%></a></div></td>
          </tr>
          <tr>
            <td align=center valign=top>
              <table width=210 border=0 cellspacing=0 cellpadding=0>
                <input type=hidden name=url value="">
                <tr>
                  <td width="98" height=29><div align="right"><strong> 用户名 : </strong> </div></td>
                  <td width="112" height=29><input name=username class=data size=16 maxlength=16 value=""></td>
                </tr>
                <tr>
                  <td height=29> <div align="right"><strong> 密码 : </strong> </div></td>
                  <td height=29><input name=password type=password class=data size=16 maxlength=16></td>
                </tr>
                <tr>
                  <td height="41" colspan="2" align=right><div align="center"><font color=fe8c14>
                    </font>
                        <font color=fe8c14>
                        <input name="submit" type=submit value="登录" class=button>
                        <input name=reset type=reset class=button id="reset2"  value="取消">
                                            </font></div>
                    <div align="center"><font color=fe8c14>
                  </font></div></td>
                  </tr>
            </table></td>
          </tr>
          <tr>
            <td align="center" >
              <table width="75%" height="36%" cellpadding="0" cellspacing="0">
                <tr>
                  <td height="5"><img src="../images/login_line.gif" width="300" height="4"></td>
                </tr>
                <tr>
                  <td height="37" align="center"> <font color="#CC0000">
                    <%
 					if(loginmsg != null && loginmsg.equals("userwrong"))
 					 	out.print("用户名或密码不正确.");
					 else if(loginmsg != null && loginmsg.equals("loginfirst"))
 					 	out.print("请先登录.");
 					 else if(loginmsg != null && loginmsg.equals("logout"))
 					 	out.print("已经成功退出系统.");	
					%>
                  </font></td>
                </tr>
              </table>
            </td>
          </tr>
        
      </table>
      
    </div></td>
  </tr>
  </form>
</table>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -