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

📄 editarticle.jsp

📁 说什么啊 自己去看 还至少20个字 真服了 着拉
💻 JSP
字号:
<%@page contentType="text/html;charset=gb2312"%>
<%@ include file="../incoming/common.jsp"%>
<%@ include file="../incoming/connectdb.jsp"%>
<%@ include file="../incoming/codefilter.jsp"%>
<%@ include file="../incoming/check.jsp"%>
<html>
<head>
<title><%=title%>管理</title>
<link href="../incoming/style.css" rel="stylesheet" type="text/css">
</head>
<script Language="JavaScript">
function check_input(theForm)
{

   if (theForm.newstitle.value == "")
  {
    alert("请输入新闻标题.");
    theForm.newstitle.focus();
    return (false);
  }

   if (theForm.newsbody.value == "")
  {
    alert("请输入新闻的内容.");
    theForm.newsbody.focus();
    return (false);
  }
  if (theForm.newstitle.value.length > 100)
    {
    alert("新闻标题长度应小于50个字.");
    theForm.newstitle.focus();
    return (false);
  }
 
}
</script>
<body>
<%
	int id =(null==request.getParameter("id")?1:(Integer.parseInt(request.getParameter("id"))));
	sql="SELECT * FROM article WHERE ID="+id+"";
	rs = smt.executeQuery(sql);
	while(rs.next())
 		{
%>
<table border="1" width=784 align=center cellpadding=0 cellspacing=0>
  <form method="POST" action="editarticleover.jsp?id=<%=id%>" onsubmit="return check_input(this)">
    <tr align="center" bgcolor="#CCCCCC"  height=25> 
      <td height="42" colspan=2><FONT COLOR="#ffffff"><FONT SIZE="5" COLOR="#ffcc00"><B><font color="#000000">修改新闻</font></B></FONT><font color="#000000" class="text"><B> 
        **为必填项目</B></font></FONT></TD>
    </tr>
    <tr> 
      <td width="30%" align="center"  class="text"><B>新闻标题</B></td>
      <td width="70%" class="text"> <input name=newstitle TYPE="text" id="newstitle" size=70 maxlength=255 value=<%=rs.getString("TITLE")%> > 
       **不得超过 50 个汉字</TD>
    </tr>
    <tr> 
      <td height="407" align="center" >&nbsp;<B>内容</B><BR> 
        <br> <li class="text">请在此填写新闻的内容<BR>
      </td>
      <td><textarea name="newsbody" cols="100%" rows="30" wrap="VIRTUAL" class="smallarea" id="newsbody" title="请在此填写新闻的内容。"><%=unHtml(rs.getString("BODY"))%></textarea>
        **</td>
    </tr>
<%}%>
    <tr> 
      <td height="80" colspan=2 align=center ><FONT color=#000000> 
        <input name=Submit type=submit value="修 改">
        &nbsp;&nbsp; 
        <input name=Submit2 type=reset value="清 除">
        </font></td>
    </tr>
  </form>
</table>
</body>
</html>

⌨️ 快捷键说明

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