📄 doninsert.jsp
字号:
<%@ page language="java" import="java.util.*,com.accpedu.LHcompany.dao.*,com.accpedu.LHcompany.entity.*" pageEncoding="gbk"%>
<html>
<head>
</head>
<body><%@ include file="checkLogin.jsp" %>
<%
request.setCharacterEncoding("gbk");
String biaoti=request.getParameter("biaoti");
String neirong=request.getParameter("neirong");
newsDao pd=new newsDao();
news p=new news();
p.setTitle(biaoti);
p.setContent(neirong);
int x=pd.insert(p);
if(x>0)
{
out.print("<script>alert('增加成功!');location.replace('NInsert.jsp');</script>");
}else
{
out.print("<script>alert('增加失败!');location.replace('NInsert.jsp');</script>");
}
%>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -