📄 modify.jsp
字号:
<%
/**
* $RCSfile: modifynews.jsp,v $
* $Author: Dingyuezong $
* $Revision: 1.0 $
* $Date: 2001/04/10 $
*/
%>
<%@ page
import="java.util.*,
java.text.*,
com.everstar.news.*"
%>
<% /////////////////
// header include
String title = "Modify News";
%>
<jsp:include page="../header.jsp" flush="true"/>
>>News>><a href="listnews.jsp">List News</a>>><a href="searchnews.jsp">Search News</a>>><a href="insertnews.jsp">Post News</a>>><a href="modifynews.jsp">Modify News</a>>><a href="deletenews.jsp">Delete News</a>
<jsp:useBean id="data" scope="session" class="com.everstar.news.NewsData" />
<jsp:useBean id="news" scope="session" class="com.everstar.news.ViewNews" />
<jsp:useBean id="cc" scope="page" class="com.everstar.news.ErrorCheck" />
<%
int id=0;
if(request.getParameter("id")!=null)
id = Integer.parseInt(request.getParameter("id"));
try{
news.setID(id);
news.init();
data = news.getData(0);
}catch(Exception E){
out.println(E.getMessage());
}
%>
<div align=center>
<br>
News Update
<hr size=0>
<%
ErrorCheck ec = new ErrorCheck();
ec.setFormName("modify");
ec.lengthCheck("title","The string you input in the fourth field in not between 2-100",2,100);
ec.lengthCheck("source","The string you input in the fourth field in not between 2-100",2,100);
ec.lengthCheck("summary","The string you input in the fourth field in not between 2-200",2,200);
ec.lengthCheck("body","The string you input in the fourth field in not between 2-4000",2,4000);
ec.lengthCheck("author","The string you input in the fourth field in not between 2-20",2,20);
out.println(ec.ErrorCheckScript());
%>
<form name=modify method=post onsubmit="return errorCheck();" action="modifydo.jsp">
<table width="90%" border="0">
<tr>
<td>ID</td>
<td>
<input type="text" name="ID" value="<%=data.getID()%>" disable=true readonly=true>
</td>
</tr>
<tr>
<td>Title</td>
<td>
<input type="text" name="title" value="<%=data.getTitle()%>">
</td>
</tr>
<tr>
<td>Source</td>
<td>
<input type="text" name="source" value="<%=data.getSource()%>">
</td>
</tr>
<tr>
<td>Summary</td>
<td>
<input type="text" name="summary" value="<%=data.getSummary()%>">
</td>
</tr>
<tr>
<td>Body</td>
<td>
<textarea name="body" cols="50" rows="5"><%=data.getBody()%></textarea>
</td>
</tr>
<tr>
<td>Author</td>
<td>
<input type="text" name="author" value="<%=data.getAuthor()%>">
</td>
</tr>
<tr>
<td>
<input type="submit" name="submit" value="Submit">
</td>
<td>
<input type="reset" name="cancel" value="Cancel">
</td>
</tr>
</table>
</form>
</div>
<br>
<jsp:include page="../footer.jsp" flush="true"/>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -