📄 managenews.jsp
字号:
<%@ page language="java" pageEncoding="utf-8"%>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic"%>
<%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html:html lang="true">
<head>
<html:base />
<title>manageNews.jsp</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<style type="text/css">
<!--
body,td,th {
font-size: 12px;
}
a:link {
text-decoration: none;
}
a:visited {
text-decoration: none;
}
a:hover {
text-decoration: none;
}
a:active {
text-decoration: none;
}
-->
</style>
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head>
<body>
<br>
<table width="98%" cellspacing="0" cellpadding="0" border="1"
bordercolordark="#8080FF" bordercolorlight="#FFFFFF">
<tbody>
<tr>
<td height="30" bgcolor="#8080FF">
<strong><bean:message key="manageNews.title1"/></strong> <select name="sort_id"
onChange="var jmpURL=this.options[this.selectedIndex].value ; if(jmpURL!='') {window.location=jmpURL;} else {this.selectedIndex=0 ;}">
<option value="?sort_id=0"><bean:message key="manageNews.title2"/></option>
<bean:write name="str" filter="false" />
</select> </td>
</tr>
</tbody>
</table>
<table width="98%" border="1" bordercolordark="#8080FF"
bordercolorlight="#FFFFFF" cellpadding="0" cellspacing="0">
<tr>
<td width="5%" height="30" align="center">
<strong> <bean:message key="manageNews.title3"/></strong> </td>
<td width="40%" align="center">
<strong><bean:message key="manageNews.title4"/></strong> </td>
<td width="20%" align="center">
<strong><bean:message key="manageNews.title5"/></strong> </td>
<td width="15%" align="center">
<strong> <bean:message key="manageNews.title6"/></strong> </td>
<td width="20%" align="center">
<strong><bean:message key="manageNews.title7"/></strong> </td>
</tr>
<logic:iterate id="list" name="newsList" scope="request">
<tr>
<td height="30" align="center">
<bean:write name="list" property="id" /> </td>
<td>
<bean:write name="list" property="title" />
</td>
<td align="center">
<bean:write name="list" property="add_time" format="yyyy-MM-dd hh:mm:ss" /></td>
<td align="center">
<a href="../editNews.do?id=<bean:write name='list' property='id' />">修改</a></td>
<td align="center">
<a href="../delNews.do?id=<bean:write name='list' property='id'/>" onclick="javascript:return confirm('Do you want to del really?')">删除</a></td>
</tr>
</logic:iterate>
</table>
<table width="98%" border="1" bordercolordark="#8080FF"
bordercolorlight="#FFFFFF" cellpadding="0" cellspacing="0">
<tr>
<td height="30" colspan="5" align="right">
共有<bean:write name="PAGER" property="totalRows" />条记录数 当前第<bean:write name="PAGER" property="currentPage"/>页
共有<bean:write name="PAGER" property="totalPages"/>页
<logic:equal name="PAGER" property="currentPage" value="1">首页 上一页</logic:equal>
<logic:notEqual name="PAGER" property="currentPage" value="1">
<a href="../manageNews.do?pageMethod=first&sort_id=<c:out value='${SORT_ID}'/>¤tPage=<c:out value='${PAGER.currentPage}'/>">首页</a>
<a href="../manageNews.do?pageMethod=previous&sort_id=<c:out value='${SORT_ID}'/>¤tPage=<c:out value='${PAGER.currentPage}'/>">上一页</a>
</logic:notEqual>
<c:if test="${PAGER.currentPage==PAGER.totalPages}">下一页 尾页</c:if>
<c:if test="${PAGER.currentPage!=PAGER.totalPages}">
<a href="../manageNews.do?pageMethod=next&sort_id=<c:out value='${SORT_ID}'/>¤tPage=<c:out value='${PAGER.currentPage}'/>">下一页</a>
<a href="../manageNews.do?pageMethod=last&sort_id=<c:out value='${SORT_ID}'/>¤tPage=<c:out value='${PAGER.currentPage}'/>">尾页</a>
</c:if>
转到
<select name="pageid" onChange="javascript:location=this.options[this.selectedIndex].value;">
<c:forEach var="p" begin="1" end="${PAGER.totalPages}">
<c:if test="${p==PAGER.currentPage}">
<option value="?currentPage=<c:out value='${p}' />&pageMethod=go&sort_id=<c:out value='${SORT_ID}' />" selected>第<c:out value="${p}"></c:out>页</option>
</c:if>
<c:if test="${p!=PAGER.currentPage}">
<option value="?currentPage=<c:out value='${p}' />&pageMethod=go&sort_id=<c:out value='${SORT_ID}' />">第<c:out value="${p}"></c:out>页</option>
</c:if>
</c:forEach>
</select>
</td>
</tr>
</table>
</body>
</html:html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -