modify_do.jsp

来自「一个商品管理的系统,包括添加商品,删除,修改等功能」· JSP 代码 · 共 63 行

JSP
63
字号
<html>
<%@ page contentType="text/html;charset=gb2312" import="java.sql.*,java.io.*" %>
<jsp:useBean id="pro" class="product1.product" scope="session">
<jsp:setProperty name="pro" property="*"/>
</jsp:useBean>
<body>
<%! 
String date;
String name;
String address;
String keep;
String price;
String mount;
%>
<%

String str=(String)request.getParameter("id");

session.setAttribute("real",str);
try
{ 
ResultSet rst=pro.findnum1(str);
while(rst.next())
{
   
   name=rst.getString("name");
   date=rst.getString("date");
   address=rst.getString("address");
   keep=rst.getString("keep");
   price=rst.getString("price");
   mount=rst.getString("mount");
   
}
}catch(Exception e) 
{} 
%>
<form action="modify_do1.jsp" method="post">
<table width="500">	
<tr>
<td width="100" align="right">商品名称</td><td width="400" align="left"><input type="text" name="name" value="<%=name%>"></td>
</tr>
<tr width="500">
<td width="100" align="right">生产日期</td><td width="400" align="left"><input type="text" name="date" value="<%=date%>" ></td>
</tr>
<tr width="500">
<td width="100" align="right">厂商</td><td width="400" align="left"><input type="text" name="address" value="<%=address%>"></td>
</tr>
<tr width="500">
<td width="100" align="right">保质期</td><td width="400" align="left"><input type="text" name="keep" value="<%=keep%>"></td>
</tr>
<tr width="500">
<td width="100" align="right">价格</td><td width="400" align="left"><input type="text" name="price" value="<%=price%>"></td>
</tr>
<tr width="500">
<td width="100" align="right">数量</td><td width="400" align="left"><input type="text" name="mount" value="<%=mount%>"></td>
</tr>
<tr width="500">
<td width="250" align="right"><input type="submit" value="提交"></td><td width="250" align="left"><input type="reset" value="重置"></td>
</tr>
</table>
</form> 
</body>
</html>

⌨️ 快捷键说明

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