jsp代码
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>删除商品页面</title> </head> <body> <script> var delet='<%=request.getParameter("delete")%>'; if(delet=='yes'){ alert("删除成功!"); } </script> <form action="aaa?method=delete" method="post"> <table align="center"> <tr> <td>请输入要删除的名称:</td> <td> <input type="text" name="aab"> </td> </tr> <tr align="center"> <td> <input type="submit" value="确定"> <input type="submit" value="返回" formaction="gongneng.jsp" formmethod="post"> </td> </tr> </table> </form> </body> </html>
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>功能选择界面</title>
</head>
<body>
<form>
<table align="center" border="1">
<tr align="center">
<td>
<input type="submit" value="增加" formaction="NewFile.jsp" formmethod="post">
</td>
</tr>
<tr align="center">
<td>
<input type="submit" value="删除" formaction="delete.jsp " formmethod="post">
</td>
</tr>
<tr align="center">
<td>
<input type="submit" value="修改" formaction="update.jsp" formmethod="post">
</td>
</tr>
<tr align="center">
<td>
<input type="submit" value="查" formaction="aaa?method=show" formmethod="post">
</td>
</tr>
</table>
</form>
</body>
</html>
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
<form action="aaa?method=doGet" method="post">
<table align="center" border="1">
<tr>
<td>受教育程度</td>
<td>
<input type="text" name="aab">
</td>
</tr>
<tr align="center">
<td colspan="2">
<input type="submit" value="提交">
<input type="submit" value="返回" formaction="gongneng.jsp" formmethod="post">
</td>
<input type="submit" value="返回" formaction="gongneng.jsp" formmethod="post">
</tr>
</table>
</form>
</body>
</html>
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>显示页面</title>
</head>
<body>
<form>
<table>
<tr>
<td>名称</td>
</tr>
<tr>
<c:forEach items="${list}" var="item">
<tr>
<td>${item.aab}</td>
</tr>
</c:forEach>
</tr>
<tr>
<td>
<input type="submit" value="返回" formaction="gongneng.jsp" formmethod="post">
</td>
</tr>
</table>
</form>
</body>
</html>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>修改页面</title> </head> <body> <script> var update='<%=request.getParameter("update")%>'; if(update=='yes'){ alert("修改成功!"); } </script> <form action="aaa?method=update" method="post"> <table align="center"> <tr> <td>请输入要修改的名称:</td> <td> <input type="text" name="aab"> </td> </tr> <tr> <td>请输入要修改后的名称:</td> <td> <input type="text" name="aab1"> </td> </tr> <tr align="center"> <td> <input type="submit" value="确定"> <input type="submit" value="返回" formaction="gongneng.jsp" formmethod="post"> </td> </tr> </table> </form> </body> </html>