帮我看看这个分页代码,为什么if (PageAll==1)//整页显示不起作用,也就是说当当前页为首页时
<p align="center">
<input type="button" class="button" onclick="location.href='?page=1&show_All=0&cond_id=<%=cond_id%>'" id="btnFirstPage" name="btnFirstPage" value="首页">
<input type="button" class="button" onclick="location.href='?page=<%=cstr(m_current_page-1)%>&show_All=0&cond_id=<%=cond_id%>'" id="btnPrevPage" name="btnPrevPage" value="上一页">
<input type="button" class="button" onclick="location.href='?page=<% if cstr(m_page_count)=cstr(m_current_page) then
response.write cstr(m_page_count)
else
m_current_page=cint(m_current_page)+1
response.write cstr(m_current_page)
end if
%>&show_All=0&cond_id=<%=cond_id%>'" id="btnNextPage" name="btnNextPage" value="下一页">
<input type="button" class="button" onclick="location.href='?page=<%=cstr(m_page_count)%>&show_All=0&cond_id=<%=cond_id%>'" id="btnLastPage" name="btnLastPage" value="末页">
<input type="button" class="button" onclick="location.href='?show_All=1&cond_id=<%=cond_id%>'" id="btnAllRecord" name="btnAllRecord" value="全部显示">
<input type="button" class="button" onclick="location.href='?page=1&show_All=0&cond_id=<%=cond_id%>'" id="btnPageRecord" name="btnPageRecord" value="分页显示">
</p>
<SCRIPT LANGUAGE="JAVASCRIPT">
<!--
// declare the variables for the page
var RecordCount=<%=iif(rs_count="",0,rs_count)%>;
var PageSize=10;
var PageCount=Math.ceil(RecordCount/PageSize);
var PageIndex=1;
var pagetemp=<%=iif(m_current_page="",1,m_current_page)%>;
var PageAll=<%=iif(show_All="",0,show_All)%>;//show_All和PageAll为0说明为分页显示
// initialize the page buttons
//<%=show_All%>
if (PageAll==1)//整页显示
{
btnFirstPage.disabled=true;
btnPrevPage.disabled=true;
btnNextPage.disabled=true;
btnLastPage.disabled=true;
btnAllRecord.disabled=true;
btnPageRecord.disabled=false;//只显示分页显示的按钮
}
else//分页显示
{
if (pagetemp==1) //第一页显示
{
btnFirstPage.disabled=true;
btnPrevPage.disabled=true;
btnPageRecord.disabled=true;
btnNextPage.disabled=false;
btnLastPage.disabled=false;
btnAllRecord.disabled=false;
}
else //pagetemp不等于1
{
if (pagetemp<=PageCount-1)//页数在2-(n-1)之间
{
btnFirstPage.disabled=false;
btnPrevPage.disabled=false;
btnNextPage.disabled=false;
btnLastPage.disabled=false;
btnAllRecord.disabled=false;
btnPageRecord.disabled=true;
}
else
{
if (pagetemp==PageCount)//最后一页
{
btnFirstPage.disabled=false;
btnPrevPage.disabled=false;
btnNextPage.disabled=true;
btnLastPage.disabled=true;
btnAllRecord.disabled=false;
btnPageRecord.disabled=true;
}
}
}
}
//-->
</SCRIPT>
还请高手们多多指教,我是看不出什么问题了。在线等,问题很小,完成就结帐。