<body onload="show(1)">
<form name="myform">
<table >
<tr>
<td id="abc">
</td>
</tr>
</table>
</form>
</body>
<%
a=""
for i=1 to 100
a=a & i & "<br>"
next
call fread(a,10,"<br>")
%>
<%
function fread(aryName,fpage,nflag)'数组名,每页记录条数,分隔符号
'客户端分页程序(Javascript)
if aryName="" then
aryName="暂无数据"& nflag
end if
myCnt=split(aryName,nflag)
%>
<script language='Javascript'>
<!--
// 客户端分页程序
var crtpage;
var fpage=<%=fpage%>;
var alljl=<%=UBound(myCnt)%>;
subcat = new Array();
var t;
<%
count = 0
myCnt=split(aryName,nflag)
For i = LBound(myCnt) To UBound(myCnt)-1
%>
subcat[<%=count%>] = new Array("<%=myCnt(i)%>");
<%
count = count + 1
next
if i mod fpage=0 then
fzong=i\fpage
else
fzong=i\fpage+1
end if
%>
var totpage=<%=fzong%>;
function show(abcd){
var fcont="<br>";
var fcc="<br>";
crtpage=abcd;
if(abcd>totpage){
abcd=totpage;
}
if(abcd<0){
abcd=1;
}
if(((abcd-1)*fpage)+fpage>alljl){
for(t=((abcd-1)*fpage);t<alljl;t++){
fcont=fcont+subcat[t]+"<br>"
}
}
else{
for(t=((abcd-1)*fpage);t<((abcd-1)*fpage)+fpage;t++){
fcont=fcont+subcat[t]+"<br>"
}
}
if(crtpage>1){
fcc=fcc+"<a href=\"Javascript:show(1)\" title=\"首页\"><B>首页</B></a> "
fcc=fcc+"<a href=\"Javascript:show("+(crtpage-1)+")\" title=\"上一页\"><B>上一页</B></a> "
}
else{
fcc=fcc+"<a href=\"Javascript:void(0)\" title=\"已经是首页了\">首页</a> "
fcc=fcc+"上一页 "
}
if(crtpage<totpage){
fcc=fcc+"<a href=\"Javascript:show("+(crtpage+1)+")\" title=\"下一页\"><B>下一页</B></a> "
fcc=fcc+"<a href=\"Javascript:show("+totpage+")\" title=\"最后一页\"><B>尾页</B></a> "
}
else{
fcc=fcc+"下一页 "
fcc=fcc+"<a href=\"Javascript:void(0)\" title=\"已经是最后一页了\">尾页</a>"
}
fcc=fcc+" <B>页次:<font color=\"#0000ff\">"+abcd+"</font>/"+totpage+" "
fcc=fcc+"<font color=\"#0000ff\">"+fpage+"</font></B> /页"
abc.innerHTML=fcont+fcc;
document.title="总页数:"+totpage+"; 每页 "+fpage+&qu