<#ftl>
|
<#macro splitpage splitPage>
|
<#if splitPage.infoCount gte splitPage.pageSize>
|
<script type="text/javascript">
|
<!--
|
function goPage(page){
|
var url = window.location.href.replace(/#/g,'');
|
if(page == ${splitPage.currentPageIndex}) return false;
|
if(/\?/g.test(url)) {
|
if(/pageindex=((\d)+)+/.test(url))
|
window.location.href = url.replace(/pageindex=((\d)+)+/, "pageindex="+page);
|
else
|
window.location.href = url +"&pageindex=" + page;
|
} else {
|
window.location.href = url + "?pageindex=" + page;
|
}
|
}
|
function SearchKeyDown(event) {
|
if (event.keyCode == 13) {
|
tzGo();
|
}
|
}
|
function isNotNull(){
|
var PageBar = document.getElementById("PageBar").value.length;
|
if(PageBar!=0)
|
return true;
|
return false;
|
}
|
function tzGo(){
|
if(document.getElementById("pageCountId").value!="1"){
|
if(isNotNull()){
|
return goPage(document.getElementById("PageBar").value);
|
}else{
|
alert("错误的页码");
|
}
|
}else{
|
alert("错误的页码");
|
}
|
|
}
|
|
//-->
|
</script>
|
<#assign page = param.pageindex?default(1) />
|
<#assign previousPage = (splitPage.currentPageIndex>1)?string(splitPage.currentPageIndex-1,1) />
|
<#assign nextPage = (splitPage.currentPageIndex == splitPage.pageCount)?string(splitPage.pageCount,splitPage.currentPageIndex+1) />
|
<input type="hidden" name="pageCountId" id="pageCountId" value="${splitPage.pageCount}" />
|
<ul class="page">
|
<li><#if page?number = 1 ><a href="####" onclick="alert('已经是第一页了!')">第一页</a><#else><a href="####" onclick="return goPage(1)">第一页</a></#if></li>
|
<li><#if page?number lte 1><a href="####" onclick="alert('已经是第一页了!')">上一页</a><#else><a href="####" onclick="return goPage(${previousPage})">上一页</a></#if></li>
|
<#list (splitPage.pageCount?number-5)..splitPage.pageCount?number as d>
|
<#if d gte 1>
|
<li <#if page == d> id="fanye" </#if>><a href="####" onclick="return goPage(${d})">${d}</a></li>
|
</#if>
|
</#list>
|
<li><#if page?number gte splitPage.pageCount?number><a href="####" onclick="alert('已经是最后一页了!')">下一页</a><#else><a href="####" onclick="return goPage(${nextPage})">下一页</a></#if></li>
|
<li><#if page?number = splitPage.pageCount?number ><a href="####" onclick="alert('已经是最后一页了!')">最末页</a><#else><a href="####" onclick="return goPage(${splitPage.pageCount})">最末页</a></#if></li>
|
</ul>
|
<!--
|
<div class="fanye3">
|
<div class="fanye4">转到<input id="PageBar" type="text" allowNull="1" style="width:40px; height:13px;" onKeyUp="value=value.replace(/\D/g,'')" onkeypress="SearchKeyDown(event)">页</div>
|
<a href="####" onclick="tzGo();"><img src="/task/images/quedingd2.gif" width="60" height="22" /></a>
|
</div>
|
-->
|
<!--翻页-->
|
|
</#if>
|
</#macro>
|