📄 topic_add_deal.jsp
字号:
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>
<jsp:useBean id="connBean" scope="page" class="beans.connDB"/>
<jsp:useBean id="chStr" class="beans.chStr" scope="page" />
<%
int UID=0;
String face="";
String content="";
UID=Integer.parseInt(request.getParameter("UID"));
face=chStr.chStr(request.getParameter("face"));
content=chStr.chStr(request.getParameter("content"));
String sql="insert into tb_Topic (author,face,content) values("+UID+",'"+face+"','"+content+"')";
int ret=0;
ret=connBean.executeUpdate(sql);
if (ret!=0){
out.println("<script language='javascript'>alert('留言成功!');window.location.href='index.jsp';</script>");
}else{
out.println("<script language='javascript'>alert('留言失败!');window.location.href='Topic_add.jsp';</script>");
}
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>添加留言</title>
</head>
<body>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -