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

📄 editclass.jsp

📁 《JSP通用模块及典型系统开发实例导航》源代码
💻 JSP
字号:
<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="../include.jsp"%>
<%
String userName = (String) session.getAttribute("username");
if (!userName.equals("admin")){ 
	response.sendRedirect("error1.jsp");
}
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Cache-Control" CONTENT="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="0">
<title>欢迎光临<%=title%></title>
<link rel="stylesheet" href="../css/news.css" type="text/css" media="screen">
</head>
<body>
<script Language="JavaScript">
<!--
function check_input(theForm)
{

   if (theForm.classname.value == "")
  {
    alert("请输入栏目名称.");
    theForm.classname.focus();
    return (false);
  }

  if (theForm.classname.value.length > 20)
    {
    alert("栏目名称长度应小于10个字符或数字.");
    theForm.classname.focus();
    return (false);
  }

}
//-->
</script><BR><BR>
<TABLE bgColor=<%=tablebgcolor%> border=0 cellPadding=0 cellSpacing=1 width=100% align=CENTER>
	<TR><TD align=middle background=../img/index/topback.gif height=10>
	</TD></TR>
</TABLE>
	<%int id =(null==request.getParameter("id")?1:(Integer.parseInt(request.getParameter("id"))));
	CategoryMgr categoryMgr =new CategoryMgr();
	Category category =categoryMgr.getById(id);	%>
<TABLE border="0" width=100% align=center cellpadding=0 cellspacing=1  bgcolor=<%=tablebgcolor%>>
<form method="POST" action="/News/EditCategoryServlet?id=<%=id%>" onsubmit="return check_input(this)">
	<TR bgcolor=<%=trbgcolor%> height=25>
		<TD colspan=2><FONT COLOR="#ffffff"><FONT SIZE="5" COLOR="#ffcc00"><B>编辑栏目</B></FONT><B>  **为必填项目</B></FONT></TD>
	</TR>
	<TR><TD width="30%" bgColor=<%=tdbgcolor%>>&nbsp;<B>栏目名称</B></TD>
		<TD width="70%" bgColor=<%=tdbgcolor%>>
		<input TYPE="text" name=classname size=20 maxlength=20 value=<%=category.getName()%>>&nbsp;**不得超过 10 个汉字</TD>
	</TR>

	<TR><TD bgColor=<%=tdbgcolor%> colspan=2 align=center><BR><FONT color=#000000>
		<INPUT name=Submit type=submit value="确 定"> &nbsp;&nbsp;     
		<INPUT name=Submit2 type=reset value="清 除"></FONT><BR></TD>
	</TR>
	<form>
</TABLE>
<%@ include file="foot.jsp"%>

⌨️ 快捷键说明

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