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

📄 login.jsp

📁 一个简单的使用JSP技术开发的在线聊天室
💻 JSP
字号:
<%@page contentType="text/html;charset=GBK"%>
<%@page import="java.util.*"%>
<html>
<head>
<title>用户登陆</title>




<script language="javascript" type="">
function checkForm() {
	if (document.form1.username.value == "") {
		alert("用户名不能为空");
		form1.username.focus();
		return false;
	}
	document.form1.submit();
}

function resetForm() {
	document.form1.reset();
}

function check1Form()
{
	alert("用户名不能为空");
}
</script>

<%
synchronized(application) {
	Vector ListUser=null;
    ListUser =(Vector)application.getAttribute("UserName");
    String UserName1="";
    UserName1=(String) session.getAttribute("sName");
    if ((!session.isNew())&&(!UserName1.equals("")))
   {
    ListUser.remove(UserName1);
   }    
}
%>


<style type="text/css">
<!--
.style2 {font-size: 24px}
-->
</style>
</head>

<body bgcolor="#FF9900">
<br>
<table align="center">
  <tr bgcolor="#FFFF99">
    <td width="93%" align="right"><span class="style2">BBS登陆</span></td>
    </td>
  </tr>
</table>
<br>
<table width="100" border="0" cellspacing="0" cellpadding="0" align="center">
  <tr>
  </tr>
  <tr align="center" valign="middle">
    <td>
      <form name="form1" method="post" action="logincheck.jsp">
        <table width="273" align="center">
          <tr bgcolor="#FFFF99">
            <td width="38%" height="18" align="right">用户名:</td>
            <td width="62%">
              <input type="text" name="username">
            </td>
          </tr>
          <tr bgcolor="#FFFF99">
            <td width="38%" height="18" align="right">密码:</td>
            <td width="62%">
              <input type="password" name="password">
            </td>
          </tr>
          <tr bgcolor="#FFFF99">
            <td width="38%" height="19" align="right">身份:</td>
            <td width="62%">
              <input type="radio" name="userType" value="Y">
              会员 
              <input type="radio" name="userType" value="N" checked>
              非会员 </td>
          </tr>
        </table>
      </form>
</td></tr>
  <tr bgcolor="#FF9900" valign="middle" align="center">
    <td height="20"><img src="button_1.gif" width="52" height="21" onClick="checkForm();" style="cursor:hand" alt="">  <img src="button_2.gif" width="52" height="21" onClick="resetForm();" style="cursor:hand" alt=""></td>
  </tr>
  <tr bgcolor="#FF9900" valign="middle" align="center">
    <td height="50">&nbsp;</td>
  </tr>
</table>
</body>
</html>

⌨️ 快捷键说明

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