📄 update.jsp
字号:
<%@ page language="java" contentType="text/html; charset=gbk" %>
<%@ page import="com.zzx.bean.*,com.zzx.manager.*"%>
<%@ taglib uri="http://java.fckeditor.net" prefix="FCK" %>
<%
request.setCharacterEncoding("GBK");
int id = Integer.parseInt(request.getParameter("id"));
News news = new NewsManager().queryById(id);
String content = news.getContent();
int type =Integer.parseInt(request.getParameter("type"));
String str= " ";
switch(type){
case 1:
str="课程简介";
break;
case 2:
str="负责人介绍";
break;
case 3:
str="教学队伍";
break;
case 4:
str="在线教学";
break;
case 5:
str="教材参考";
break;
default:
str="未知";
}
%>
<HTML>
<HEAD>
<TITLE>更新内容</TITLE>
<LINK REL="stylesheet" TYPE="text/css" HREF="../inc/admin.css">
</HEAD>
<body leftmargin="0" topmargin="0">
<center>
<br>
<h2><%=str%>内容更新</h2>
<hr>
<form name=form2 method=post action=update_do.jsp>
<input type="hidden" name="type" value=<%=type%> />
<table width="100%">
<tr>
<td width="10%">标题:<input type="text" name="title" size="60" value=<%=news.getTitle()%>></td>
</tr>
</table>
<br>
<table width="100%">
<tr><td width="10%">详细内容:</td>
</tr></table>
<center>
<script type="text/javascript" src="${pageContext.request.contextPath}/fckeditor/fckeditor.js"></script>
<textarea name="content1" cols="80" rows="4">
<%=content%>
</textarea>
<script type="text/javascript">
var oFCKeditor = new FCKeditor('content1') ;
oFCKeditor.BasePath = "${pageContext.request.contextPath}/fckeditor/";
oFCKeditor.Height = 400;
oFCKeditor.ToolbarSet = "Default" ;
oFCKeditor.ReplaceTextarea();
</script>
<input type="hidden" name="id" value=<%=id%> />
<input type="hidden" name="type" value=<%=type%> />
<INPUT type="submit" value="提 交" class="ButtonStyle">
</center>
</form>
<table align="center">
<tr>
<td><font color="#FF0000">注意:标题和详细内容不能为空,否则将不能正确提交!</font>
</td>
</tr>
</table>
</body>
</HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -