
<script type="text/javascript">
    function _go() {
        var pageNO = $("#pageCode").val();
        /* 获取文本框中的当前页码 */
        if(!/^[1-9]\d*$/.test(pageNO)) {
            /* 对当前页码进行整数校验 */
            alert('请输入正确的页码！');
            return;
        }
        var page = "${page.pages}";
        page = parseInt(page);
        if(pageNO > page) {
            /* 判断当前页码是否大于最大页 */
            alert('请输入正确的页码！');
            return;
        }
        var pageno = "${page.pageNo}";
        pageno = parseInt(pageno);
        if(pageNO == pageno) {
            alert("您处于" + pageNO + "页!");
            return;
        }
        location = "${path}${url}" + pageNO;
    }
</script>


<div align="right" style="margin-right: 18px">
<div class="divBody">
    <div id="testDIV"></div>
    <form action="" id="myForm" method="post"></form>
    <div class="btn-group">
        <span class="btn btn-lowblue radius">
            <#if page.pageNo == 1>
                <a class="active">上一页</a>
            <#else>
                <a href="${path}${url}${page.pageNo-1}" class="aBtn bold">上一页</a>
            </#if>
        </span>
        <#if page.pages lte 6>
            <#assign begin=1/>
            <#assign end=page.pages/>
        <#else>
            <#assign begin=(page.pageNo - 2)/>
            <#assign end=(page.pageNo + 3)/>
            <#if begin lt 1>
                <#assign begin=1/>
                <#assign end=1/>
            <#else>
                <#assign begin=(page.pages - 5)/>
                <#assign end=(page.pages)/>
            </#if>
        </#if>

        <#--<#list begin .. end as pageN>
            <#if pageN == page.pageNo>
                <span class="btn btn-lowblue radius"><a  class="active">${pageN}</a></span>
            <#else>
                <span class="btn btn-lowblue radius"><a href="${path}${url}${pageN}" class="aBtn">${pageN}</a></span>
            </#if>
        </#list>

        <#if end==page.pages><a class="active">...</a></#if>-->
        <span class="btn btn-lowblue radius">
            <#if (page.pageNo == page.pages || page.pages == 0)>
                <a class="active">下一页</a>
            <#else>
                <a href="${path }${url}${page.pageNo+1}" class="aBtn bold">下一页</a>
            </#if>
		</span>
        <span class="btn" style="cursor: default;">
    			您当前位于:${page.pageNo}页
    	</span>

        <span class="btn" style="cursor: default;">共<a class="active">${page.pages}</a>页</span>
        <span class="btn" style="cursor: default;">到<a class="active" style="max-height: 36px;min-height: 34px"><input type="text" id="pageCode" value="${page.pageNo}" class="input-text radius" style="width: 36px;height:22px;text-align: center;" maxlength="3"/></a>页</span>
        <span class="btn btn-lowblue radius"><a href="javascript:_go();" class="active">确定</a></span>
        <a href="#" style="overflow:hidden" class="active"></a>
    </div>
</div>
</div>