分頁的時候,調用只需要用INCLUDE進來就可以了
<!--使用時請指定搜索字符串search_str這個可以為空,以及總頁數allpage和總記錄數RCount和this_pagesize-->
<%if search_str="" then search_str="search_str=str"%>
<SCRIPT>
<!--
function MM_jumpMenu(selObj,restore){ //v3.0
eval("location.href='<%=this_page%>?<%=search_str%>&p="+selObj.options[selObj.selectedIndex].value+"'");
if (restore) selObj.selectedIndex=0;
}
//-->
</SCRIPT>
<style type="text/css">
.page_link a {
text-decoration: none;
color:#0000FF;
}
.page_link a:visited {
text-decoration: none;
color:#0000FF;
}
.page_link a:hover {
text-decoration: none;
color:#FF0000;
}
.page_link a:active {
text-decoration: none;
color:#FF0000;
}
.page_num {
background-color : #EDF5F9;
ine-height : normal;
border:1px solid #B4C6DA;
font-family: "Courier New", Arial, sans-serif, "新細明體", "細明體";
height: 20px;
25px;
padding-top: 0px;
padding-right: 2px;
padding-bottom: 0px;
padding-left: 2px;
font-size: 12px;
text-align: center;
vertical-align: middle;
}
.page_curnum {
background-color : #68A6DD;
border:1px solid #B4C6DA;
padding-right:2px;
color:#FFFFFF;
font-family: "Courier New", Arial, sans-serif, "新細明體", "細明體";
text-align: center;
vertical-align: middle;
height: 20px;
25px;
font-size: 12px;
font-weight: bold;
}
.page_num_sel {
background-color : #EDF5F9;
ine-height : normal;
border:1px solid #B4C6DA;
font-family: "Courier New", Arial, sans-serif, "新細明體", "細明體";
height: 20px;
padding-top: 0px;
padding-right: 2px;
padding-bottom: 0px;
padding-left: 2px;
font-size: 12px;
text-align: center;
vertical-align: middle;
}
</style>
<table width="100%" border="0" cellspacing="0" cellpadding="3" align="center">
<tr valign="top">
<td align="center">
<div class="page_link">
<%if p>0 then%>
<%if allpage<>1 then%>
<%if p>1 then%>
<span class="page_num"><a href="<%=this_page%>?<%=search_str%>&p=1" title="第一頁"><font face="Webdings">9</font></a></span>
<span class="page_num"><a href="<%=this_page%>?<%=search_str%>&p=<%=p-1%>" title="上一頁"><font face="Webdings">7</font></a></span>
<%end if%>
<%
quotient=int(p/10)
remainder=(p mod 10)
if remainder=0 then quotient=quotient-1
for i=quotient*10+1 to (quotient+1)*10
if i>allpage then exit for
%>
<%if p=i then%>
<span class="page_curnum"><%=i%></span>
<%else%>
<span class="page_num"><a href="<%=this_page%>?<%=search_str%>&p=<%=i%>" title="第<%=i%>頁"><%=i%></a></span>
<%end if%>
<%next%>
<%if p<allpage then%>
<span class="page_num"><a href="<%=this_page%>?<%=search_str%>&p=<%=p+1%>" title="下一頁"><font face="Webdings">8</font></a></span>
<span class="page_num"><a href="<%=this_page%>?<%=search_str%>&p=<%=allpage%>" title="最後一頁"><font face="Webdings">:</font></a></span>
<%end if%>
跳第
<select name="p" class="page_num_sel" onChange="MM_jumpMenu(this,0)">
<%for i=1 to allpage%>
<option value="<%=i%>"<%if i=p then response.write " selected"%>><%=i%></option>
<%next%>
</select>頁
<%end if%>
頁碼:<font color="red"><%=p%></font>/<font color="blue"><%=allpage%></font>
記錄數:<font color="red"><%=this_pagesize%></font>/<font color="blue"><%=Rcount%></font>
</div>
<%end if%></td>
</tr>
</table>
<%if search_str="" then search_str="search_str=str"%>
<SCRIPT>
<!--
function MM_jumpMenu(selObj,restore){ //v3.0
eval("location.href='<%=this_page%>?<%=search_str%>&p="+selObj.options[selObj.selectedIndex].value+"'");
if (restore) selObj.selectedIndex=0;
}
//-->
</SCRIPT>
<style type="text/css">
.page_link a {
text-decoration: none;
color:#0000FF;
}
.page_link a:visited {
text-decoration: none;
color:#0000FF;
}
.page_link a:hover {
text-decoration: none;
color:#FF0000;
}
.page_link a:active {
text-decoration: none;
color:#FF0000;
}
.page_num {
background-color : #EDF5F9;
ine-height : normal;
border:1px solid #B4C6DA;
font-family: "Courier New", Arial, sans-serif, "新細明體", "細明體";
height: 20px;
25px;
padding-top: 0px;
padding-right: 2px;
padding-bottom: 0px;
padding-left: 2px;
font-size: 12px;
text-align: center;
vertical-align: middle;
}
.page_curnum {
background-color : #68A6DD;
border:1px solid #B4C6DA;
padding-right:2px;
color:#FFFFFF;
font-family: "Courier New", Arial, sans-serif, "新細明體", "細明體";
text-align: center;
vertical-align: middle;
height: 20px;
25px;
font-size: 12px;
font-weight: bold;
}
.page_num_sel {
background-color : #EDF5F9;
ine-height : normal;
border:1px solid #B4C6DA;
font-family: "Courier New", Arial, sans-serif, "新細明體", "細明體";
height: 20px;
padding-top: 0px;
padding-right: 2px;
padding-bottom: 0px;
padding-left: 2px;
font-size: 12px;
text-align: center;
vertical-align: middle;
}
</style>
<table width="100%" border="0" cellspacing="0" cellpadding="3" align="center">
<tr valign="top">
<td align="center">
<div class="page_link">
<%if p>0 then%>
<%if allpage<>1 then%>
<%if p>1 then%>
<span class="page_num"><a href="<%=this_page%>?<%=search_str%>&p=1" title="第一頁"><font face="Webdings">9</font></a></span>
<span class="page_num"><a href="<%=this_page%>?<%=search_str%>&p=<%=p-1%>" title="上一頁"><font face="Webdings">7</font></a></span>
<%end if%>
<%
quotient=int(p/10)
remainder=(p mod 10)
if remainder=0 then quotient=quotient-1
for i=quotient*10+1 to (quotient+1)*10
if i>allpage then exit for
%>
<%if p=i then%>
<span class="page_curnum"><%=i%></span>
<%else%>
<span class="page_num"><a href="<%=this_page%>?<%=search_str%>&p=<%=i%>" title="第<%=i%>頁"><%=i%></a></span>
<%end if%>
<%next%>
<%if p<allpage then%>
<span class="page_num"><a href="<%=this_page%>?<%=search_str%>&p=<%=p+1%>" title="下一頁"><font face="Webdings">8</font></a></span>
<span class="page_num"><a href="<%=this_page%>?<%=search_str%>&p=<%=allpage%>" title="最後一頁"><font face="Webdings">:</font></a></span>
<%end if%>
跳第
<select name="p" class="page_num_sel" onChange="MM_jumpMenu(this,0)">
<%for i=1 to allpage%>
<option value="<%=i%>"<%if i=p then response.write " selected"%>><%=i%></option>
<%next%>
</select>頁
<%end if%>
頁碼:<font color="red"><%=p%></font>/<font color="blue"><%=allpage%></font>
記錄數:<font color="red"><%=this_pagesize%></font>/<font color="blue"><%=Rcount%></font>
</div>
<%end if%></td>
</tr>
</table>
第二個
<!--使用時請指定搜索字符串search_str這個可以為空,以及總頁數allpage和總記錄數RCount和this_pagesize-->
<%if search_str="" then search_str="search_str=str"%>
<SCRIPT>
<!--
function MM_jumpMenu(selObj,restore){ //v3.0
eval("location.href='<%=this_page%>?<%=search_str%>&p="+selObj.options[selObj.selectedIndex].value+"'");
if (restore) selObj.selectedIndex=0;
}
//-->
</SCRIPT>
<style type="text/css">
.page_link a {
text-decoration: none;
color:#0000FF;
}
.page_link a:visited {
text-decoration: none;
color:#0000FF;
}
.page_link a:hover {
text-decoration: none;
color:#FF0000;
}
.page_link a:active {
text-decoration: none;
color:#FF0000;
}
.page_num {
background-color : #EDF5F9;
ine-height : normal;
border:1px solid #B4C6DA;
font-family: "Courier New", Arial, sans-serif, "新細明體", "細明體";
height: 20px;
25px;
padding-top: 0px;
padding-right: 2px;
padding-bottom: 0px;
padding-left: 2px;
font-size: 12px;
text-align: center;
vertical-align: middle;
}
.page_curnum {
background-color : #68A6DD;
border:1px solid #B4C6DA;
padding-right:2px;
color:#FFFFFF;
font-family: "Courier New", Arial, sans-serif, "新細明體", "細明體";
text-align: center;
vertical-align: middle;
height: 20px;
25px;
font-size: 12px;
font-weight: bold;
}
.page_num_sel {
background-color : #EDF5F9;
ine-height : normal;
border:1px solid #B4C6DA;
font-family: "Courier New", Arial, sans-serif, "新細明體", "細明體";
height: 20px;
padding-top: 0px;
padding-right: 2px;
padding-bottom: 0px;
padding-left: 2px;
font-size: 12px;
text-align: center;
vertical-align: middle;
}
</style>
<table width="100%" border="0" cellspacing="0" cellpadding="3" align="center">
<tr valign="top">
<td align="center">
<%if p>0 then%>
<div class="page_link">
<%if allpage<>1 then%>
<%if p>1 then%>
<span class="page_num"><a href="<%=this_page%>?<%=search_str%>&p=1" title="第一頁"><font face="Webdings">9</font></a></span>
<span class="page_num"><a href="<%=this_page%>?<%=search_str%>&p=<%=p-1%>" title="上一頁"><font face="Webdings">7</font></a></span>
<%end if%>
<%if p<allpage then%>
<span class="page_num"><a href="<%=this_page%>?<%=search_str%>&p=<%=p+1%>" title="下一頁"><font face="Webdings">8</font></a></span>
<span class="page_num"><a href="<%=this_page%>?<%=search_str%>&p=<%=allpage%>" title="最後一頁"><font face="Webdings">:</font></a></span>
<%end if%>跳第<select name="p" class="page_num_sel" onChange="MM_jumpMenu(this,0)">
<%for i=1 to allpage%>
<option value="<%=i%>"<%if i=p then response.write " selected"%>><%=i%></option>
<%next%>
</select>頁
<%end if%>
頁碼:<font color="red"><%=p%></font>/<font color="blue"><%=allpage%></font> 記錄數:<font color="red"><%=this_pagesize%></font>/<font color="blue"><%=RCount%></font>
</div>
<%end if%></td>
</tr>
</table>
<%if search_str="" then search_str="search_str=str"%>
<SCRIPT>
<!--
function MM_jumpMenu(selObj,restore){ //v3.0
eval("location.href='<%=this_page%>?<%=search_str%>&p="+selObj.options[selObj.selectedIndex].value+"'");
if (restore) selObj.selectedIndex=0;
}
//-->
</SCRIPT>
<style type="text/css">
.page_link a {
text-decoration: none;
color:#0000FF;
}
.page_link a:visited {
text-decoration: none;
color:#0000FF;
}
.page_link a:hover {
text-decoration: none;
color:#FF0000;
}
.page_link a:active {
text-decoration: none;
color:#FF0000;
}
.page_num {
background-color : #EDF5F9;
ine-height : normal;
border:1px solid #B4C6DA;
font-family: "Courier New", Arial, sans-serif, "新細明體", "細明體";
height: 20px;
25px;
padding-top: 0px;
padding-right: 2px;
padding-bottom: 0px;
padding-left: 2px;
font-size: 12px;
text-align: center;
vertical-align: middle;
}
.page_curnum {
background-color : #68A6DD;
border:1px solid #B4C6DA;
padding-right:2px;
color:#FFFFFF;
font-family: "Courier New", Arial, sans-serif, "新細明體", "細明體";
text-align: center;
vertical-align: middle;
height: 20px;
25px;
font-size: 12px;
font-weight: bold;
}
.page_num_sel {
background-color : #EDF5F9;
ine-height : normal;
border:1px solid #B4C6DA;
font-family: "Courier New", Arial, sans-serif, "新細明體", "細明體";
height: 20px;
padding-top: 0px;
padding-right: 2px;
padding-bottom: 0px;
padding-left: 2px;
font-size: 12px;
text-align: center;
vertical-align: middle;
}
</style>
<table width="100%" border="0" cellspacing="0" cellpadding="3" align="center">
<tr valign="top">
<td align="center">
<%if p>0 then%>
<div class="page_link">
<%if allpage<>1 then%>
<%if p>1 then%>
<span class="page_num"><a href="<%=this_page%>?<%=search_str%>&p=1" title="第一頁"><font face="Webdings">9</font></a></span>
<span class="page_num"><a href="<%=this_page%>?<%=search_str%>&p=<%=p-1%>" title="上一頁"><font face="Webdings">7</font></a></span>
<%end if%>
<%if p<allpage then%>
<span class="page_num"><a href="<%=this_page%>?<%=search_str%>&p=<%=p+1%>" title="下一頁"><font face="Webdings">8</font></a></span>
<span class="page_num"><a href="<%=this_page%>?<%=search_str%>&p=<%=allpage%>" title="最後一頁"><font face="Webdings">:</font></a></span>
<%end if%>跳第<select name="p" class="page_num_sel" onChange="MM_jumpMenu(this,0)">
<%for i=1 to allpage%>
<option value="<%=i%>"<%if i=p then response.write " selected"%>><%=i%></option>
<%next%>
</select>頁
<%end if%>
頁碼:<font color="red"><%=p%></font>/<font color="blue"><%=allpage%></font> 記錄數:<font color="red"><%=this_pagesize%></font>/<font color="blue"><%=RCount%></font>
</div>
<%end if%></td>
</tr>
</table>