var flag = '${param.flag}';
if(flag != null && flag != '' && flag != undefined) {
if(flag == 'success') {
alert('删除成功');
}else if(flag == 'failed') {
alert('删除失败');
}
}
function addNews() {
window.location = "newsDetailCreateSimple.jsp";
}
function page_nav(frm,num) {
frm.pageIndex.value = num;
frm.submit();
}
新闻分类:
全部
国内
国际
娱乐
军事
财经
天气
新闻标题
GO
增加
新闻标题作者时间操作
int pageSize = 2;
String pageIndex = request.getParameter("pageIndex");
int currentPageNo;
if(pageIndex == null) {
currentPageNo = 1;
}else{
currentPageNo = Integer.parseInt(pageIndex);
}
//总记录数
int totalCount = newsService.getTotalCount();
//总页数
PageSupport ps = new PageSupport();
ps.setPageSize(pageSize);
ps.setCurrentPageNo(currentPageNo);
ps.setTotalCount(totalCount);
int totalPageCount = ps.getTotalPageCount();
//首页尾页的异常控制
if(currentPageNo < 1){
currentPageNo = 1;
}
if(currentPageNo > totalPageCount){
currentPageNo = totalPageCount;
}
List newsList=newsService.getPageNewsList(currentPageNo,pageSize);
int i=0;
for(News news:newsList){
i++;
%>
class="admin-list-td-h2">删除
}
%>