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

📄 managermodifycategory.jsp

📁 一个小型的JSP购物网站
💻 JSP
字号:
<%@ page language="java" import="java.util.*" pageEncoding="gbk"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
	 <script type="text/javascript" language="javascript">
  	function checkcate()
  	{
  		var x = document.cateform;
  		if(x.category.value=="")
  		{
  			alert("请填写大类名称!");
  			x.category.focus();
  			return false;
  		}
  	}
  	function checksmall()
  	{
  		var x = document.smallform;
  		if(x.small.value=="")
  		{
  			alert("请填写小类名称!");
  			x.small.focus();
  			return false;
  		}
  	}
  </script>
    <base href="<%=basePath%>">
    <title>My JSP 'ManagerModifyCategory.jsp' starting page</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 rel="stylesheet" href="mm_health_nutr.css" type="text/css" />

  </head>
  <body>
  	<br>
   	<table>
   	<tr><td><img src="mm_spacer.gif" alt="" width="88" height="1" border="0"/></td>
   	<td>
   	<form name="cateform" onSubmit="return checkcate()">
   	<c:if test="${requestScope.category!=null}">
   		<fieldset>
   			<legend>修改大类</legend>
   			<table cellpadding="3">
   				<tr>
   					<td>大类编号:</td>
   					<td>
   					<input type="hidden" value="${requestScope.category[0].cid}" name="categoryid">
   					<c:out value="${requestScope.category[0].cid}"></c:out></td>
   				</tr>
   				<tr>
   					<td>大类名称:</td>
   					<td><input type="text" name="categoryname" value="${requestScope.category[0].cname}"></td>
   				</tr>
   			   	<tr>
   					<td colspan="2"><hr size="1px" color="green"></td>
   				</tr>
   				<tr>
   					<td></td>
   					<td><input type="submit" value=" 修 改 " name="Submit"></td>
   				</tr>
   			</table>
   		</fieldset>
   	</c:if>
   	</form>
   	</td>
   	<td>
   	<form name="smallform" onSubmit="return checksmall()">
   	<c:if test="${requestScope.smallcategory!=null}">
   		<fieldset>
   			<legend>修改小类</legend>
   			<table cellpadding="3">
   				<tr>
   					<td>小类编号:</td>
   					<td>
   					<input type="hidden" value="${requestScope.smallcategory[0].scid}" name="smallcid">
   					<c:out value="${requestScope.smallcategory[0].scid}"></c:out></td>
   				</tr>
   				<tr>
   					<td>小类名称:</td>
   					<td><input type="text" name="smallname" value="${requestScope.smallcategory[0].sname}"></td>
   				</tr>
   				<tr>
   					<td>所属大类:</td>
   					<td>
						<select name="cateid">
   						<c:forEach var="ca" items="${requestScope.cate}">
   						<c:if test="${ca.cid==requestScope.smallcategory[0].cid}">
   							<option value="${ca.cid}" selected="selected">${ca.cname}</option>
   						</c:if>
   						<c:if test="${ca.cid!=requestScope.smallcategory[0].cid}">
   						<option value="${ca.cid }">${ca.cname}</option>
   						</c:if>
   						</c:forEach>
   					</select>	
   					</td>
   				</tr>	
   			   	<tr>
   					<td colspan="2"><hr size="1px" color="green"></td>
   				</tr>
   				<tr>
   					<td></td>
   					<td><input type="submit" value=" 修 改 "></td>
   				</tr>
   			</table>
   		</fieldset>
   	</c:if>
   	</form>
   	</td>
   	</tr>
   	</table>
  </body>
</html>

⌨️ 快捷键说明

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