代码如下:
<tbody>
<c:forEach items="${requestScope.productList}" var="product">
<tr>
<td><input type="checkbox" class="cbx_select" id="cbx_product_select_${product.product_id}"><label for="cbx_product_select_${product.product_id}"></label></td>
<td title="${product.product_name}">${product.product_name}</td>
<td title="${product.product_title}">${product.product_title}</td>
<td title="${product.product_price}">${product.product_price}</td>
<td title="${product.product_sale_price}">${product.product_sale_price}</td>
<td title="${product.product_create_date}">${product.product_create_date}</td>
<td>
<c:choose>
<c:when test="${product.product_isEnabled==0}"><span class="td_success" title="产品正常销售中">销售中</span></c:when>
<c:when test="${product.product_isEnabled==2}"><span class="td_warn" title="产品显示在主页促销中">促销中</span></c:when>
<c:otherwise><span class="td_error" title="产品缺货或违规停售中">停售中</span></c:otherwise>
</c:choose>
</td>
<td><span class="td_special" title="查看产品详情"><a href="javascript:void(0)" onclick="getChildPage(this)">详情</a></span></td>
<strong><span class="td_special" title="删除产品"><a href="${pageContext.request.contextPath}/order/deliveryss/${product.product_id}">删除</a></span></strong>
<td hidden><span class="product_id">${product.product_id}</span></td>
</tr>
</c:forEach>
</tbody>
删除产品那里总是一点击下一页或者查询 涉及到更新table内容的 删除就没有了
tbody.append("<tr><td><input type='checkbox' class='cbx_select' id='cbx_product_select_" + product_id + "'><label for='cbx_product_select_" + product_id + "'></label></td><td title='"+product_name+"'>" + product_name + "</td><td title='"+product_title+"'>" + product_title + "</td><td title='"+product_price+"'>" + product_price + "</td><td title='"+product_sale_price+"'>" + product_sale_price + "</td><td title='"+product_create_date+"'>" + product_create_date + "</td><td><span class='" + isEnabledClass + "' title='"+isEnabledTitle+"'>"+ isEnabled + "</span></td><td><span class='td_special' title='查看产品详情'><a href='javascript:void(0);' onclick='getChildPage(this)'>详情</a></span>" + " "+ "<span class='td_special' title='删除产品'><a href=''${pageContext.request.contextPath}''/order/deliveryss/'${product.product_id}''>删除</a></span></td><td hidden><span class='product_id'>" + product_id + "</span></td></tr>"); }