📄 addnews.jsp
字号:
<%@ include file="../conn.jsp"%>
<% String flag = (String) session.getValue("flag");
if((flag==null)|(flag=="")){
response.sendRedirect("login.jsp");
}
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta http-equiv="Content-Language" content="zh-cn">
<link rel="stylesheet" href="../inc/register.css" type="text/css">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>天天人才—>人才市场—>管理登录</title>
</head>
<form action=addnews.jsp method=post>
<body topmargin="0" leftmargin="0">
<BR>
<div align="center">
<center>
<table border="1" cellpadding="0" cellspacing="0" width="450" height="320" bordercolor="#000000" bordercolorlight="#000000" bordercolordark="#FFFFFF">
<tr>
<td width="446" height="17" valign="bottom" background="../images/t-bg1.gif">
<p align="center">=== 添加新闻 ===</td>
</tr>
<tr>
<td valign="top" bgcolor="#fffff4" width="446">
<p align="center"><br>
标 题:<input type="text" name="title" size="37" maxLength=25>
<p align="center">正 文:<br>
<textarea rows="17" name="text" cols="52" ></textarea>
<p align="center"><input type="submit" value="添 加" style="position: relative; height: 20"><br>
<br>
</td>
</tr>
</table>
</center>
</div>
</body>
</html>
<%request.setCharacterEncoding("GB2312");
String title=request.getParameter("title");
String text=request.getParameter("text");
if((title!=null)&&(text!=null))
{stmt.executeUpdate("INSERT INTO scott.jobnews(id,title,text) VALUES(scott.jobnewsid.nextval,'"+title+"','"+text+"')");
%>
<SCRIPT language=JavaScript>
alert('新闻添加成功!');
javascript:window.close();
</SCRIPT>
<%}%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -