📄 updateproduct.jsp
字号:
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page import="com.westaccp.jsp.company.dao.*" %>
<%@ page import="com.westaccp.jsp.company.dao.impl.*" %>
<%@ page import="com.westaccp.jsp.company.model.*" %>
<%
int productId = Integer.parseInt(request.getParameter("productId"));
ProductDao productDao = new ProductDaoImpl();
Product product = productDao.findProduct(productId);
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>修改商品信息</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<link type="text/css" rel="stylesheet" href="css/common.css" />
<script type="text/javascript" src="js/addProduct.js"></script>
</head>
<body>
<form action="../servlet/UpdateProductServlet" method="post" onsubmit="return checkForm()">
<input type="hidden" name="productId" value="<%=productId %>" />
<table id="tab" cellspacing="0" cellpadding="5" width="100%">
<tr>
<td colspan="2" class="header">添加商品信息</td>
</tr>
<tr>
<td class="bg1" width="200">商品编号(系列):</td>
<td class="bg2">
<input type="text" value="<%=product.getSeiralNumber() %>" name="txtSerialNumber" id="txtSerialNumber" class="txt" onblur="checkSerialNumber()" />
<label id="lblSerialNumber"></label>
</td>
</tr>
<tr>
<td class="bg1">商品名称:</td>
<td class="bg2">
<input type="text" value="<%=product.getName() %>" name="txtProductName" id="txtProductName" class="txt" onblur="checkName()" />
<label id="lblProductName"></label>
</td>
</tr>
<tr>
<td class="bg1">商品商标:</td>
<td class="bg2">
<input type="text" value="<%=product.getBrand() %>" name="txtBrand" id="txtBrand" class="txt" onblur="checkBrand();" />
<label id="lblBrand"></label>
</td>
</tr>
<tr>
<td class="bg1">商品型号:</td>
<td class="bg2">
<input type="text" value="<%=product.getModel() %>" name="txtModel" id="txtModel" class="txt" onblur="checkModel();" />
<label id="lblModel"></label>
</td>
</tr>
<tr>
<td class="bg1">商品价格:</td>
<td class="bg2">
<input type="text" value="<%=product.getPrice() %>" name="txtPrice" id="txtPrice" class="txt" onblur="checkPrice()" />
<label id="lblPrice"></label>
</td>
</tr>
<tr>
<td class="bg1">商品图片:</td>
<td class="bg2">
<input type="file" value="<%=product.getPicture() %>" name="txtPicture" id="txtPicture" class="txt" onblur="checkPicture();" />
<label id="lblPicture"></label>
</td>
</tr>
<tr>
<td class="bg1">商品介绍:</td>
<td class="bg2">
<textarea rows="5" cols="40" name="txtDescription" id="txtDescription" class="area" onblur="checkDescription()"><%=product.getDescription() %></textarea>
<label id="lblDescription"></label>
</td>
</tr>
<tr>
<td class="bg1"> </td>
<td class="bg2">
<input type="submit" value="提交" class="btn" />
<input type="reset" value="重置" class="btn" />
</td>
</tr>
</table>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -