JAVAWEB网上商城项目页面设计之JSP页面设计二------JavaWeb

329 篇文章 2 订阅
<%@ page import="bean.product" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>ProductDelete</title>
<style>
	.a1{
		width: 600px;
		height: 460px;		
/*		border: solid;*/
	}
	.a1 h3{
		margin: 0px;
		text-align: center;
	}
	.if{
		width: 310px;
		height: 430px;
		display: inline-block;
/*		border: solid;*/
		border-right: solid;
	}
	.a2{
		display: inline-block;
		vertical-align: top;
	}
</style>
</head>
<script>
	function ok(){
		alert("删除成功!");
	}
</script>
<body>
<form class="a1" method="post" action="http://localhost:8080/controller.DeleteServlet">
	<h3>商品管理--删除</h3>
	<iframe class="if" src="ProductQueryHandle.jsp" frameborder="0"></iframe>
	<div class="a2">
		<p>删除后不可恢复!</p>
		<p>如果要删除请点击下方“确定”按钮</p>
		<%
			product product = (bean.product) session.getAttribute("SearchProduct");
			if(!(product == null))
			{
				out.println("<input type=\"hidden\" name=\"product_name\" value=\"" + product.getProduct_name() + "\">");
			}
		%>
		<input type="submit" value="确定">
	</div>
</form>
</body>
</html>
<%@ page import="bean.product" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>ProductDelete</title>
<style>
   .a1{
      width: 600px;
      height: 460px;    
/*    border: solid;*/
   }
   .a1 h3{
      margin: 0px;
      text-align: center;
   }
   .if{
      width: 310px;
      height: 430px;
      display: inline-block;
/*    border: solid;*/
      border-right: solid;
   }
   .a2{
      display: inline-block;
      vertical-align: top;
   }
</style>
</head>
<script>
   function ok(){
      alert("删除成功!");
   }
</script>
<body>
<form class="a1" method="post" action="http://localhost:8080/controller.DeleteServlet">
   <h3>商品管理--删除</h3>
   <iframe class="if" src="ProductQueryHandle.jsp" frameborder="0"></iframe>
   <div class="a2">
      <p>删除后不可恢复!</p>
      <p>如果要删除请点击下方“确定”按钮</p>
      <%
         product product = (bean.product) session.getAttribute("SearchProduct");
         if(!(product == null))
         {
            out.println("<input type=\"hidden\" name=\"product_name\" value=\"" + product.getProduct_name() + "\">");
         }
      %>
      <input type="submit" value="确定">
   </div>
</form>
</body>
</html>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>ProductNew</title>
<style>
	.a1{
		width: 600px;
		height: 460px;		
/*		border: solid;*/
	}
	.a1 h3{
		margin: 0px;
		text-align: center;
	}
	.a3{
	width: 310px;
	height: 430px;
	display: inline-block;
	vertical-align: top;
	border-right: solid;
	}
	.a4{
	width: 270px;
	height: 430px;
	display: inline-block;
	vertical-align: top;
/*	border: solid black;*/
	}
</style>
</head>
<body>
<div class="a1">
	<h3>商品管理--新增</h3>
	<form action="http://localhost:8080/controller.AddProductServlet" method="post">
	<div class="a3">
		<table>
			<tr>
				<td colspan="2">请输入商品基本信息(*为必填)</td>
			</tr>
			<tr>
				<td>产品名:(*)</td>
				<td><input type="text" name="product_name" value="" required></td>
			</tr>
			<tr>
				<td>品牌名:(*)</td>
				<td><input type="text" name="brand_name" value="" required></td>
			</tr>
			<tr>
				<td>产品单价:(*)</td>
				<td><input type="text" name="price" value="" required></td>
			</tr>
			<tr>
				<td>类别:(*)</td>
				<td><input type="text" name="type_name" value="" required></td>
			</tr>
			<tr>
				<td>加入时间:(*)</td>
				<td><input type="text" name="time" placeholder="格式 2018-1-1 默认此时" value="" required></td>
			</tr>
			<tr>
				<td>存入数量:(*)</td>
				<td><input type="text" name="amount" value="" required></td>
			</tr>
			<tr>
				<td><input type="reset" value="重填"></td>
				<td><input type="submit" value="提交"></td>
			</tr>
		</table>
	</div>
	<div class="a4">
		<table>
			<tr>
				<td>产地:</td>
				<td><input type="text" required></td>
			</tr>
			<tr>
				<td>生产日期:</td>
				<td><input type="text" required></td>
			</tr>
			<tr>
				<td>条形码:</td>
				<td><input type="text" required></td>
			</tr>
			<tr>
				<td>商品描述:</td>
				<td>
					<textarea rows="5" cols="23" name="description" required></textarea>
				</td>
			</tr>
			<tr>
				<td>产品图片:</td>
			</tr>
			<tr>
				<td colspan="2"><input type="file" accept="image/*" size="20"></td>
			</tr>
			<tr>
				<td>PDF:</td>
			</tr>
			<tr>
				<td colspan="2"><input type="file"/></td>
			</tr>
		</table>
	</div>
	</form>
</div>
</body>
</html>

<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>ProductNew</title>
<style>
   .a1{
      width: 600px;
      height: 460px;    
/*    border: solid;*/
   }
   .a1 h3{
      margin: 0px;
      text-align: center;
   }
   .a3{
   width: 310px;
   height: 430px;
   display: inline-block;
   vertical-align: top;
   border-right: solid;
   }
   .a4{
   width: 270px;
   height: 430px;
   display: inline-block;
   vertical-align: top;
/* border: solid black;*/
   }
</style>
</head>
<body>
<div class="a1">
   <h3>商品管理--新增</h3>
   <form action="http://localhost:8080/controller.AddProductServlet" method="post">
   <div class="a3">
      <table>
         <tr>
            <td colspan="2">请输入商品基本信息(*为必填)</td>
         </tr>
         <tr>
            <td>产品名:(*)</td>
            <td><input type="text" name="product_name" value="" required></td>
         </tr>
         <tr>
            <td>品牌名:(*)</td>
            <td><input type="text" name="brand_name" value="" required></td>
         </tr>
         <tr>
            <td>产品单价:(*)</td>
            <td><input type="text" name="price" value="" required></td>
         </tr>
         <tr>
            <td>类别:(*)</td>
            <td><input type="text" name="type_name" value="" required></td>
         </tr>
         <tr>
            <td>加入时间:(*)</td>
            <td><input type="text" name="time" placeholder="格式 2018-1-1 默认此时" value="" required></td>
         </tr>
         <tr>
            <td>存入数量:(*)</td>
            <td><input type="text" name="amount" value="" required></td>
         </tr>
         <tr>
            <td><input type="reset" value="重填"></td>
            <td><input type="submit" value="提交"></td>
         </tr>
      </table>
   </div>
   <div class="a4">
      <table>
         <tr>
            <td>产地:</td>
            <td><input type="text" required></td>
         </tr>
         <tr>
            <td>生产日期:</td>
            <td><input type="text" required></td>
         </tr>
         <tr>
            <td>条形码:</td>
            <td><input type="text" required></td>
         </tr>
         <tr>
            <td>商品描述:</td>
            <td>
               <textarea rows="5" cols="23" name="description" required></textarea>
            </td>
         </tr>
         <tr>
            <td>产品图片:</td>
         </tr>
         <tr>
            <td colspan="2"><input type="file" accept="image/*" size="20"></td>
         </tr>
         <tr>
            <td>PDF:</td>
         </tr>
         <tr>
            <td colspan="2"><input type="file"/></td>
         </tr>
      </table>
   </div>
   </form>
</div>
</body>
</html>
<%@ page import="bean.product" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>ProductNew</title>
<style>
	.a1{
		width: 280px;
	}
</style>
	<script>
		function ok(){
			alert("修改成功!");
		}
	</script>
</head>
<body>
<div class="a1">
<div style="border-bottom: solid">
<form action="http://localhost:8080/controller.SearchProductServlet" method="post">
<table>
	<tr>
		<td colspan="2">定位商品</td>
	</tr>
	<tr>
		<td>商品名:</td>
		<td><input type="text" name="product_name"></td>
	</tr>
	<tr>
		<td><input type="reset" value="重填"></td>
		<td><input type="submit" value="查询" onClick="showDetail()"></td>
	</tr>
</table>
</form>
</div>
<form id="detail" action="http://localhost:8080/controller.ChangeProductServlet" method="post">
	<table>
		<%
			product product = (bean.product) session.getAttribute("SearchProduct");
		%>
		<tr>
			<td>产品名:</td>
			<td>
				<%
					if(!(product == null))
					{
						out.println("<input type=\"text\" name=\"product_name\" required value=\"" + product.getProduct_name() + "\">");
					}
					else
					{
						out.println("<input type=\"text\">");
					}
				%>
				</td>
		</tr>
		<tr>
			<td>品牌名:</td>
			<td>
				<%
					if(!(product == null))
					{
						out.println("<input type=\"text\" name=\"brand_name\" required value=\"" + product.getBrand_name() + "\">");
					}
					else
					{
						out.println("<input type=\"text\">");
					}
				%>
				</td>
		</tr>
		<tr>
			<td>产品单价:</td>
			<td>
				<%
					if(!(product == null))
					{
						out.println("<input type=\"text\" name=\"price\" required value=\"" + product.getPrice() + "\">");
					}
					else
					{
						out.println("<input type=\"text\">");
					}
				%>
				</td>
		</tr>
		<tr>
			<td>类别:</td>
			<td>
				<%
					if(!(product == null))
					{
						out.println("<input type=\"text\" name=\"type_name\" required value=\"" + product.getType_name() + "\">");
					}
					else
					{
						out.println("<input type=\"text\">");
					}
				%>
				</td>
		</tr>
		<tr>
			<td>上次修改时间:</td>
			<td>
				<%
					if(!(product == null))
					{
						out.println("<input type=\"text\" value=\"\" placeholder=\"格式 2023-6-15 默认此时\">");
					}
					else
					{
						out.println("<input type=\"text\">");
					}
				%>
				</td>
		</tr>
		<tr>
			<td>数量:</td>
			<td>
				<%
					if(!(product == null))
					{
						out.println("<input type=\"text\" name=\"amount\" required value=\"" + product.getAmount() + "\">");
					}
					else
					{
						out.println("<input type=\"text\">");
					}
				%>
				</td>
		</tr>
		<tr>
			<td>产地:</td>
			<td>
				<%
					if(!(product == null))
					{
						out.println("<input type=\"text\" name=\"\" value=\"深圳\">");
					}
					else
					{
						out.println("<input type=\"text\">");
					}
				%>
				</td>
		</tr>
		<tr>
			<td>生产日期:</td>
			<td>
				<%
					if(!(product == null))
					{
						out.println("<input type=\"text\" value=\"2023-6\" placeholder=\"格式 2000-9\">");
					}
					else
					{
						out.println("<input type=\"text\">");
					}
				%>
				</td>
		</tr>
		<tr>
			<td>条形码:</td>
			<td>
				<%
					if(!(product == null))
					{
						out.println("<input type=\"text\" value=\"9787560633503\">");
					}
					else
					{
						out.println("<input type=\"text\">");
					}
				%>
				</td>
		</tr>
		<tr>
			<td>描述:</td>
			<td>
				<%
					if(!(product == null))
					{
						out.println("<textarea rows=\"5\" cols=\"23\" required name=\"description\" placeholder=\"" + product.getDescription() + "\">" + "</textarea>");
					}
					else
					{
						out.println("<textarea rows=\"5\" cols=\"23\"></textarea>");
					}
				%>
			</td>
		</tr>
		<tr>
			<td>封面图片:</td>
			<td>无</td>
		</tr>
		<tr>
			<td>电子书:</td>
			<td>无</td>
		</tr>
		<p>修改完成后点击“确定”按钮</p>
		<input type="submit" onClick="ok()">
	</table>
</form>
</div>
</body>
</html>

<%@ page import="bean.product" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>ProductNew</title>
<style>
   .a1{
      width: 280px;
   }
</style>
   <script>
      function ok(){
         alert("修改成功!");
      }
   </script>
</head>
<body>
<div class="a1">
<div style="border-bottom: solid">
<form action="http://localhost:8080/controller.SearchProductServlet" method="post">
<table>
   <tr>
      <td colspan="2">定位商品</td>
   </tr>
   <tr>
      <td>商品名:</td>
      <td><input type="text" name="product_name"></td>
   </tr>
   <tr>
      <td><input type="reset" value="重填"></td>
      <td><input type="submit" value="查询" onClick="showDetail()"></td>
   </tr>
</table>
</form>
</div>
<form id="detail" action="http://localhost:8080/controller.ChangeProductServlet" method="post">
   <table>
      <%
         product product = (bean.product) session.getAttribute("SearchProduct");
      %>
      <tr>
         <td>产品名:</td>
         <td>
            <%
               if(!(product == null))
               {
                  out.println("<input type=\"text\" name=\"product_name\" required value=\"" + product.getProduct_name() + "\">");
               }
               else
               {
                  out.println("<input type=\"text\">");
               }
            %>
            </td>
      </tr>
      <tr>
         <td>品牌名:</td>
         <td>
            <%
               if(!(product == null))
               {
                  out.println("<input type=\"text\" name=\"brand_name\" required value=\"" + product.getBrand_name() + "\">");
               }
               else
               {
                  out.println("<input type=\"text\">");
               }
            %>
            </td>
      </tr>
      <tr>
         <td>产品单价:</td>
         <td>
            <%
               if(!(product == null))
               {
                  out.println("<input type=\"text\" name=\"price\" required value=\"" + product.getPrice() + "\">");
               }
               else
               {
                  out.println("<input type=\"text\">");
               }
            %>
            </td>
      </tr>
      <tr>
         <td>类别:</td>
         <td>
            <%
               if(!(product == null))
               {
                  out.println("<input type=\"text\" name=\"type_name\" required value=\"" + product.getType_name() + "\">");
               }
               else
               {
                  out.println("<input type=\"text\">");
               }
            %>
            </td>
      </tr>
      <tr>
         <td>上次修改时间:</td>
         <td>
            <%
               if(!(product == null))
               {
                  out.println("<input type=\"text\" value=\"\" placeholder=\"格式 2023-6-15 默认此时\">");
               }
               else
               {
                  out.println("<input type=\"text\">");
               }
            %>
            </td>
      </tr>
      <tr>
         <td>数量:</td>
         <td>
            <%
               if(!(product == null))
               {
                  out.println("<input type=\"text\" name=\"amount\" required value=\"" + product.getAmount() + "\">");
               }
               else
               {
                  out.println("<input type=\"text\">");
               }
            %>
            </td>
      </tr>
      <tr>
         <td>产地:</td>
         <td>
            <%
               if(!(product == null))
               {
                  out.println("<input type=\"text\" name=\"\" value=\"深圳\">");
               }
               else
               {
                  out.println("<input type=\"text\">");
               }
            %>
            </td>
      </tr>
      <tr>
         <td>生产日期:</td>
         <td>
            <%
               if(!(product == null))
               {
                  out.println("<input type=\"text\" value=\"2023-6\" placeholder=\"格式 2000-9\">");
               }
               else
               {
                  out.println("<input type=\"text\">");
               }
            %>
            </td>
      </tr>
      <tr>
         <td>条形码:</td>
         <td>
            <%
               if(!(product == null))
               {
                  out.println("<input type=\"text\" value=\"9787560633503\">");
               }
               else
               {
                  out.println("<input type=\"text\">");
               }
            %>
            </td>
      </tr>
      <tr>
         <td>描述:</td>
         <td>
            <%
               if(!(product == null))
               {
                  out.println("<textarea rows=\"5\" cols=\"23\" required name=\"description\" placeholder=\"" + product.getDescription() + "\">" + "</textarea>");
               }
               else
               {
                  out.println("<textarea rows=\"5\" cols=\"23\"></textarea>");
               }
            %>
         </td>
      </tr>
      <tr>
         <td>封面图片:</td>
         <td>无</td>
      </tr>
      <tr>
         <td>电子书:</td>
         <td>无</td>
      </tr>
      <p>修改完成后点击“确定”按钮</p>
      <input type="submit" onClick="ok()">
   </table>
</form>
</div>
</body>
</html>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>商城后台管理系统</title>
<style>
body{
	width: 720px;
	height: 480px;
	border: solid black;
	margin: 20px auto;
}
.a1{
	width: 100px;
	height: 480px;
	border-right: solid black;
	display: inline-block;
}
.a1 a{
	display: block;
	padding: 0px 20px;
}
.a2{
	width: 612px;
	height: 480px;
	display: inline-block;
	vertical-align: top;
}
</style>
<script>
	function change(s){
		document.getElementById("if").src="html/" + s+".jsp";
	}
</script>
</head>
<body>
	<div class="a1">
		<a onClick="change('welcome')" href="#1" style="padding: 2px;">欢迎页</a>
		<a style="padding: 2px;">商品管理</a>
		<a onClick="change('ProductNew')" href="#2">上架</a>
		<a onClick="change('ProductAdd')" href="#3">添加</a>
		<a onClick="change('ProductAlter')" href="#4">修改</a>
		<a onClick="change('ProductDelete')" href="#5">删除</a>
		<a style="padding: 2px;">用户管理</a>
		<a onClick="change('userAdd')" href="#11">注册</a>
		<a onClick="change('userDelete')" href="#12">注销</a>
	</div>
	<div class="a2">
		<iframe id="if" src="html/welcome.jsp" frameborder="0" width="100%" height="100%"></iframe>
	</div>
</body>
</html>

<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>商城后台管理系统</title>
<style>
body{
   width: 720px;
   height: 480px;
   border: solid black;
   margin: 20px auto;
}
.a1{
   width: 100px;
   height: 480px;
   border-right: solid black;
   display: inline-block;
}
.a1 a{
   display: block;
   padding: 0px 20px;
}
.a2{
   width: 612px;
   height: 480px;
   display: inline-block;
   vertical-align: top;
}
</style>
<script>
   function change(s){
      document.getElementById("if").src="html/" + s+".jsp";
   }
</script>
</head>
<body>
   <div class="a1">
      <a onClick="change('welcome')" href="#1" style="padding: 2px;">欢迎页</a>
      <a style="padding: 2px;">商品管理</a>
      <a onClick="change('ProductNew')" href="#2">上架</a>
      <a onClick="change('ProductAdd')" href="#3">添加</a>
      <a onClick="change('ProductAlter')" href="#4">修改</a>
      <a onClick="change('ProductDelete')" href="#5">删除</a>
      <a style="padding: 2px;">用户管理</a>
      <a onClick="change('userAdd')" href="#11">注册</a>
      <a onClick="change('userDelete')" href="#12">注销</a>
   </div>
   <div class="a2">
      <iframe id="if" src="html/welcome.jsp" frameborder="0" width="100%" height="100%"></iframe>
   </div>
</body>
</html>
  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值