自己写的提示错误,网上复制的就没问题……检查了一下一模一样~
那就在这保存好正确的,以后留着用。
index页面:
1 <%@ page language="java" contentType="text/html; charset=UTF-8" 2 pageEncoding="UTF-8"%> 3 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> 4 <html> 5 <head> 6 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 7 <title>Insert title here</title> 8 </head> 9 <body> 10 11 <% 12 response.sendRedirect("login.jsp"); 13 %> 14 15 </body> 16 </html>
login页面:
1 <%@ page language="java" contentType="text/html; charset=UTF-8" 2 pageEncoding="UTF-8"%> 3 4 <form name="form1" method="post" method="post" action=""> 5 用户名:<input name="name" type="text" id="name" style="width:120px"><br> 6 密 码:<input name="pwd" type="password" id="pwd" style="width:120px"><br> 7 <br> 8 <input type = "submit" name="Submit" value="提交"> 9 </form>
时间: 2024-11-06 08:14:26