You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
test/catelogMana.jsp

71 lines
2.5 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ page isELIgnored="false" %>
<%
String path = request.getContextPath();
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<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" type="text/css" href="<%=path %>/css/base.css" />
<script language="javascript">
function catelogDel(id)//确定删除确定后跳转界面删除菜品类别的id
{
if(confirm('您确定删除吗?'))
{
window.location.href="<%=path %>/catelog?type=catelogDel&id="+id;
}
}
function catelogAdd()//菜品类别添加
{
var url="<%=path %>/admin/catelog/catelogAdd.jsp";
window.location.href=url;
}
</script>
</head>
<body leftmargin="2" topmargin="2" background='<%=path %>/img/allbg.gif'>
<table width="98%" border="0" cellpadding="2" cellspacing="1" bgcolor="#D1DDAA" align="center" style="margin-top:8px">
<tr bgcolor="#E7E7E7">
<td height="14" colspan="4" background="<%=path %>/img/tbg.gif">&nbsp;&nbsp;</td>
</tr>
<tr align="center" bgcolor="#FAFAF1" height="22">
<td width="10%">序号</td>
<td width="80%">类别名称</td>
<td width="10%">操作</td>
</tr>
<c:forEach items="${requestScope.catelogList}" var="catelog" varStatus="sta"><!-- 依次读取菜品信息 -->
<tr align='center' bgcolor="#FFFFFF" height="22">
<td bgcolor="#FFFFFF" align="center">
${sta.index+1}
</td>
<td bgcolor="#FFFFFF" align="center">
${catelog.name}
</td>
<td bgcolor="#FFFFFF" align="center">
<input type="button" value="删除" onclick="catelogDel(${catelog.id})"/>
</td>
</tr>
</c:forEach>
</table>
<table width='98%' border='0'style="margin-top:8px;margin-left: 8px;">
<tr>
<td>
<input type="button" value="添加菜品类别" style="width: 120px;" onclick="catelogAdd()" />
</td>
</tr>
</table>
</body>
</html>