addbook.jsp
来自「精通NetBeans光盘源代码,很好很好的资料」· JSP 代码 · 共 31 行
JSP
31 行
<%@page contentType="text/html"%><%@page pageEncoding="gb2312"%><html> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <title>添加图书</title> </head> <body> <h4> <h3>请输入要添加图书的信息:</h3> <form action="BookShopServlet" method="post"> 图书编号:<input type="text" name="id"><br> 图书名称:<input type="text" name="name"><br> 图书价格:<input type="text" name="price"><br> <input type="hidden" value="addbook" name="action"> <input type="submit" value=" 添加 " > </form></h4> <a href="BookShopServlet?action=showall">查看所有图书</a> <% Object obj=session.getAttribute("add"); if(session.getAttribute("add")!=null){ if(((String)obj).equals("ok")){ out.println("<hr>添加成功"); }else{ out.println("<hr>添加失败"); } } session.setAttribute("add",null); %> </body></html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?