?? buildhtmll.jsp
字號:
<%@ page contentType="text/html; charset=gb2312" import="java.util.*,java.io.*,java.sql.*"%>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<%
String check = new String(request.getParameter("check").getBytes("ISO-8859-1"),"GBK");
String idsr = request.getParameter("idsr");
String title = new String(request.getParameter("bt").getBytes("ISO-8859-1"),"GBK");
String str = new String(request.getParameter("nr").getBytes("ISO-8859-1"),"GBK");
str=str.replaceAll("<","<");
String content = str.replaceAll("\r\n","<br>");
%>
<jsp:useBean id="ConBean" scope="session" class="com.bitc.ch13.DBCon"/>
<%
//更新數據庫
Connection con = ConBean.getConnection();
String sql="update jsp8_news set lishu=?,biaoti=?,neirong=? where id='"+idsr+"'";
PreparedStatement pstmt = con.prepareStatement(sql);
pstmt.setString(1,check);
pstmt.setString(2,title);
pstmt.setString(3,content);
pstmt.executeUpdate();
pstmt.close();
ConBean.close();
%>
<script language="vbscript">
msgbox "發布成功!!",vbInformation,"提示"
window.location="wenzhangxp.jsp?id=<%=check%>"
</script>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -