📄 main.jsp
字号:
<%@page contentType="text/html;charset=gb2312"%>
<%@ include file="../incoming/common.jsp"%>
<%@ include file="../incoming/connectdb.jsp"%>
<%@ include file="../incoming/check.jsp"%>
<html>
<head>
<title><%=title%>管理</title>
<link href="../incoming/style.css" rel="stylesheet" type="text/css">
</head>
<body bgcolor="#FFFFFF">
<table width=500 border=1 align=center cellPadding=0 cellSpacing=0 bordercolor="#999999" >
<tbody>
<tr bgcolor="#CCCCCC">
<td colspan=2 align=center><FONT SIZE="3" COLOR="#ffffff"><B><font color="#000000">系统管理后台</font></B></FONT></TD>
</tr>
<tr align="center">
<td colspan="2"><a href="addarticle.jsp">发布新闻</a>
<a href="javascript:this.location.reload()">刷新</a> <a href="../index.jsp">主页</a>
<%
Statement _smt=con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE);
ResultSet _rs;
String _sql;
_sql="SELECT * FROM article";
_rs = _smt.executeQuery(_sql);
while(_rs.next())
{
%> <div align="right"></div> </td>
</tr>
<tr>
<td height="20"><div align="left"><SPAN class="text">●</SPAN><a href="editarticle.jsp?id=<%=_rs.getInt("ID")%>"><%=_rs.getString("TITLE")%></a></div></td>
<td align=center width=29%><a href="editarticle.jsp?id=<%=_rs.getInt("ID")%>">编辑新闻</a> <a href="javascript:del(<%=_rs.getInt("ID")%>)">删除新闻</a></td>
</tr>
<%}%>
</tbody>
</table>
<script language="JavaScript">
<!--
function del(id)
{
if (confirm("您确信要删除吗?") )
top.location="delarticle.jsp?id="+id
}
</script>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -