📄 newsedittest.jsp
字号:
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8" errorPage="../error.jsp"%>
<jsp:useBean id="s" class="com.wsy.StringTrans"/>
<jsp:useBean id="sql" class="com.wsy.selectsql"/>
<jsp:useBean id="news" class="com.wsy.news"/>
<jsp:setProperty property="*" name="news"/>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
<%
String id=news.getId().trim();
String title=news.getTitle().trim();
String content=news.getContent().trim();
String author=news.getAuthor().trim();
int i=sql.updateNews(title,content,author,id);
if(i==1){
%>
<script language="javascript">
alert("修改成功!");
window.close();
</script>
<%
response.sendRedirect("newsBrowse.jsp");
}
%>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -