⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 editarticle.jsp

📁 仿校内网站
💻 JSP
字号:
<%@page contentType="text/html"%><%@page pageEncoding="utf-8"%><%@ page import="java.sql.*"%><%--The taglib directive below imports the JSTL library. If you uncomment it,you must also add the JSTL library to the project. The Add Library... actionon Libraries node in Projects view can be used to add the JSTL 1.1 library.--%><%--<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> --%><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"   "http://www.w3.org/TR/html4/loose.dtd"><jsp:useBean id="db" class="ArticleSharing.DBTools" scope="session"/><html>    <head>        <style>a{TEXT-DECORATION:none}</style>        <meta http-equiv="Content-Type" content="text/html; charset=utf-8">        <title></title>    <style type="text/css"><!--body {	background-image: url(picture.jpg);}.STYLE1 {font-size: 36px}-->    </style></head>    <body>    <table width="764" border="0" align="center">      <tr>        <td><img src="5clogo.jpg" width="754" height="121"></td>      </tr>    </table>    <h1 align="center">&nbsp;</h1>    <table width="85%" height="640" border="0" align="center">      <tr>        <td><p><a href="articlelist.jsp"><img border="0" src="tubiao6.jpg" width="52" height="52"></a></p></td>      </tr>      <tr>        <td align="center" valign="top">		<%		String id = request.getParameter("id");		String sql = "select post_title, poster_name, post_content from posts where post_id='" + id + "'";		ResultSet rs = db.excuteQuery(sql);		String title = null;		String author = null;		String content = null;		if (rs.next()) {			title = rs.getString("post_title");			author = rs.getString("poster_name");			content = rs.getString("post_content");		}		%>        <form name="form1" method="post" action="ArticleServlet">          <input type="hidden" name="command" value="modify"/>          <input type="hidden" name="id" value="<%=id%>"/>          <table width="100%" height="600" border="0" align="center">            <tr>              <td width="20%" align="right" bgcolor="#99FF66">标题:</td>              <td width="80%" align="left" bgcolor="#99FF66"><label>                <input name="title" type="text" id="title" value="<%=title%>">              </label></td>            </tr>            <tr>              <td align="right" bgcolor="#99FF66">作者:</td>              <td align="left" bgcolor="#99FF66"><label>                <input name="author" type="text" id="author" value="<%=author%>">              </label></td>            </tr>            <tr>              <td align="right" valign="top" bgcolor="#99FF66">帖子内容:</td>              <td><label>              <textarea name="article" cols="100" rows="35" id="article" align="left"><%=content%></textarea>              </label></td>            </tr>            <tr>              <td>&nbsp;</td>              <td><label>                <input type="submit" name="Submit" value="提交">                <input type="reset" name="Reset" value="重置">              </label></td>            </tr>          </table>        </form></td>      </tr>    </table>    <p>&nbsp;</p>    <%--    This example uses JSTL, uncomment the taglib directive above.    To test, display the page like this: index.jsp?sayHello=true&name=Murphy    --%>    <%--    <c:if test="${param.sayHello}">        <!-- Let's welcome the user ${param.name} -->        Hello ${param.name}!    </c:if>    --%>        </body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -