标签:doctype ota encoding 4.0 public click lang w3c nal
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title></title>
</head>
<center>
<body>
<h1>在线问答</h1><br/>
<a href="#">我要提问</a>
<table style="text-align:center">
<tbody>
<tr>
<td>序号</td>
<td>问题</td>
<td>回答次数</td>
<td>最后修改</td>
</tr>
<c:forEach items="${qlist }" var="q" varStatus="status">
<tr <c:if test="${status.count%1==0 }">
style="background-color:lightgreen;color:black"
</c:if>>
<td>${status.count }</td>
<td><a href="findAnswers?questionid=${q.id }">${q.title }</a></td>
<td>${q.answercount }</td>
<td>${q.lastmodified }</td>
</tr>
</c:forEach>
</tbody>
<tfoot>
<tr>
<td colspan="4">
<a href="findQuestions?curPage=1&pageSize=${pageSize }">首页</a>
<a href="findQuestions?curPage=${curPage-1 }&pageSize=${pageSize}"onclick="return checkFirst()">上一页</a>
<a href="findQuestions?curPage=${curPage+1 }&pageSize=${pageSize}"onclick="return checkLast()">下一页</a>
<a href="findQuestions?curPage=totalPage&pageSize=${pageSize }">末页</a>
</td>
</tr>
</tfoot>
</table>
</body>
</center>
<script type="text/javascript">
function checkFirst(){
if(${curPage>1}){
return true;
}
return false;
};
function checkLast(){
if(${curPage<totalPage}){
return true;
}
return false;
};
</script>
</html>
标签:doctype ota encoding 4.0 public click lang w3c nal
原文地址:http://www.cnblogs.com/ZuiBuShangDao/p/6441220.html