asp分页代码
<%'开始分页
Const MaxPerPage=25
dim totalPut
dim CurrentPage
dim TotalPages
dim j
dim sql
if Not isempty(request("page")) then
currentPage=Cint(request("page"))
else
currentPage=1
end if
set rs=server.createobject("adodb.recordset")
rs.open "*",conn,1,1
if rs.eof And rs.bof then
Response.Write "<p align='center' class='in'> 您还没有添加活动!</p>"
else
totalPut=rs.recordcount
if currentpage<1 then
currentpage=1
end if
if (currentpage-1)*MaxPerPage>totalput then
if (totalPut mod MaxPerPage)=0 then
currentpage= totalPut \ MaxPerPage
else
currentpage= totalPut \ MaxPerPage + 1
end if
end if
if currentPage=1 then
&n
相关文档:
一、用OWC
什么是OWC?
OWC是Office Web Compent的缩写,即Microsoft的Office Web组件,它为在Web中绘制图形提供
了灵活的同时也是最基本的机制。在一个intranet环境中,如果可以假设客户机上存在特定的浏览器和一
些功能强大的软件(如IE5和Office 2000),那么就有能力利用Office Web组件提供一个交互式图形开
......
'判断是否是数字(包括整数和浮点数)
function IsNumber(str)
if RegPatrn("^-?[1-9]\d*$",str) or RegPatrn("^-?([1-9]\d*\.\d*|0\.\d*[1-9]\d*|0?\.0+|0)$",str) then
IsNumber=true
else
IsNumber=false
end if
end function
'正则表达式判断是否匹配
Function RegPatrn(patrn, strng)
RegPatrn = false
Di ......
4、纯ASP代码生成图表函数——饼图
<%dim total(7,1)
total(1,0)="中国经营报"
total(2,0)="招聘网"
total(3,0)="51Job"
total(4,0)="新民晚报"
total(5,0)="新闻晚报"
total(6,0)="南方周末"
total(7,0)="羊城晚报"
total(1,1)=200
total(2,1)=1200
total(3,1)=900
total(4,1)=600
total(5,1)=1 ......