login.jsp

来自「JSP常用模块源代码之邮件管理模块的全部源代码」· JSP 代码 · 共 47 行

JSP
47
字号
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>用户登陆</title>
</head>

<body>
<form name="form1" method="post" action="">
  <table width="80%" align="center" cellpadding="0" cellspacing="0">
    <tr> 
      <td height="25" align="right">用户名:</td>
      <td><input name="user" type="text" id="user" value="tougao-email"></td>
    </tr>
    <tr> 
      <td height="25" align="right">密码:</td>
      <td><input name="pwd" type="password" id="pwd" value="8807698"></td>
    </tr>
    <tr> 
      <td height="25" align="right">邮件地址: </td>
      <td><input name="from" type="text" id="from" value="tougao-email@126.com"></td>
    </tr>
    <tr> 
      <td height="25" align="right">Pop3地址:</td>
      <td><input name="pop" type="text" id="pop" value="pop.126.com"></td>
    </tr>
    <tr> 
      <td height="25" align="right">SMTP地址:</td>
      <td><input name="smtp" type="text" id="smtp" value="smtp.126.com"></td>
    </tr>
    <tr> 
      <td height="25">&nbsp;</td>
      <td><input type="submit" name="Submit" value=" 登 陆 "></td>
    </tr>
  </table>
</form>
</body>
</html>
<%
if (request.getParameter("Submit")!=null){
	session.setAttribute("user",request.getParameter("user"));
	session.setAttribute("pwd",request.getParameter("pwd"));
	session.setAttribute("from",request.getParameter("from"));
	session.setAttribute("pop",request.getParameter("pop"));
	session.setAttribute("smtp",request.getParameter("smtp"));
	response.sendRedirect("index.html");
}
%>

⌨️ 快捷键说明

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