📄 syscode.asp
字号:
<%
'=================================================
'过程名:pagenum(page,pagesum,actcs)
'作 用:显示页数
'参 数:page是当前页数
' PAGESUM是页面总数
' ACT是点击连接的URL(包括PAGE变量名称
'=================================================
function pagenum(page,pagesum,actcs)
if cint(page)>10 then
ks=page-5
js=page+5
if ks<1 then
ks=1
js=ks+10
end if
if js>cint(pagesum) then
js=pagesum
ks=js-10
end if
else
if cint(pagesum)>11 then
ks=1
js=11
else
ks=1
js=pagesum
end if
end if
response.write "第<font color='#ff0000'>"&page&"</font>/<font color='#ff0000'>"&pagesum&"</font>页 "
if page<>1 then
response.Write("<a href='" & actcs & "1'>首页</a> <a href='" & actcs & page-1 &"'>上一页</a> ")
else
response.Write("首页 上一页 ")
end if
for i= ks to js
if i<10 then
if cint(i)=cint(page) then
response.Write("<font color='#FF0000'>0"& i & "</font> ")
else
response.Write("<a href='" & actcs & i &"'>0"& i & "</a> ")
end if
else
if cint(i)=cint(page) then
response.Write("<font color='#FF0000'>"& i & "</font> ")
else
response.Write("<a href='" & actcs & i &"'>"& i & "</a> ")
end if
end if
next
if cint(page)<cint(pagesum) then
response.Write("<a href='" & actcs & page+1 & "'>下一页</a> <a href='" & actcs & pagesum & "'>尾页</a> ")
else
response.Write("下一页 尾页 ")
end if
end function
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -