login.jsp
来自「机械工业出版社的《jsp2.0动态网站开发实例指南》的源代码」· JSP 代码 · 共 38 行
JSP
38 行
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>EHBS</title>
</head>
<BODY bgColor=#6597d9>
<%
String name = request.getParameter("name");
String pwd = request.getParameter("pwd");
if (name != null && pwd !=null) {
%>
<jsp:forward page="/loginServlet" />
<%
}
else if(name !=null || pwd !=null){
%>
<p align="center">
You should input both name and pwd!<br><br>
</p>
<%
}
%>
<form name="form1" method="post" action="login.jsp">
<p align="center">User ID
<input type="text" name="name">
</p>
<p align="center">
Password
<input type="password" name="pwd">
</p>
<p align="center">
<input type="submit" name="Submit" value="Submit">
<input type="reset" name="Submit2" value="Reset">
</p>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?