⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 buy.jsp

📁 jsp超市管理系统系统,是用经典的MVC设计模式开发的非常适合初学者学习。
💻 JSP
字号:
<%@ page contentType="text/html;charset=gbk"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>   
    <title>进货登记</title>
  </head>
  
  <body>
  <br><br>
	<table cellpadding="1" cellspacing="1" border="1" align="center">
		<tr>
	   	 	<th align="center" width="50">提示</th>
	    	<th align="center" width="150">商品条形码</th>
	    	<th align="center" width="150">商品名称</th>
	    	<th align="center" width="75">进货价格</th>
	    	<th align="center" width="75">出售价格</th>
	    	<th align="center" width="75">库存数量</th>
	   	 	<th align="center" width="75">商品类别</th>
	   	 	<th align="center" width="50">操作</th>    
		</tr>
		<c:forEach var="m" items="${col}">
		<form method="post" action="Buy?id=<c:out value="${m.id}"/>">
	    <tr>
	        <td align="center"><c:if test="${m.amount <= 3}"><img src="image/pic.gif" alt="该进货了!"></c:if>&nbsp;</td>
	    	<td align="center"><c:out value="${m.code}"/>&nbsp;</td>
	    	<td align="center"><c:out value="${m.tname}"/>&nbsp;</td>
	    	<td align="center"><c:out value="${m.bprice}"/>&nbsp;</td>
	    	<td align="center"><c:out value="${m.sprice}"/>&nbsp;</td>
	    	<td align="center"><c:out value="${m.amount}"/>&nbsp;</td>
	    	<td align="center"><c:out value="${m.type}"/>&nbsp;</td>
	    	<td align="center"><input type="button" value="进货" onClick="location.href='Buy?id=${m.id}'"></td>
		</tr>
	
		</c:forEach>
		<tr align="right">
			<td colspan="8" align="right">
				<% if(request.getAttribute("page") != null){out.println(request.getAttribute("page"));}%>&nbsp;
			</td>
		</tr>
	</table>


	<%
		try{
			if(Long.parseLong((String)request.getAttribute("totals")) == 0){
	 %>
	 		<br><br>
			<center><font size=4 color="blue">抱歉,数据库中没有商品信息!</font></center>
	<%
			}
		}
		catch(Exception e){
			System.out.println(e);
		}
	 %>

  </body>
</html>

⌨️ 快捷键说明

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