您现在的位置是:网站首页> 编程资料编程资料
ASP分页时计算页面总数的几种算法小结_应用技巧_
2023-05-25
244人已围观
简介 ASP分页时计算页面总数的几种算法小结_应用技巧_
下面是我从网上找到三种ASP分页时计算页面总数的方法,此方法仅为分页时计算页面总数,并非整个分页代码:
方法一
' HTMer_RecordCount为要计算的页面总数
' HTMer_RecordCount为记录集数
' HTMer_PageSize为每页记录数
If HTMer_RecordCount Mod HTMer_PageSize=0 Then
HTMer_PageCount=Int(HTMer_RecordCount/HTMer_PageSize)
Else
HTMer_PageCount=Int(HTMer_RecordCount/HTMer_PageSize)+1
End If
方法二
' HTMer_RecordCount为要计算的页面总数
' HTMer_RecordCount为记录集数
' HTMer_PageSize为每页记录数
HTMer_PageCount=Int(HTMer_RecordCount/HTMer_PageSize*-1)*-1
方法三
' HTMer_RecordCount为要计算的页面总数
' HTMer_RecordCount为记录集数
' HTMer_PageSize为每页记录数
HTMer_PageCount=Abs(Int(-(HTMer_RecordCount/HTMer_PageSize)))
方法四
' HTMer_RecordCount为要计算的页面总数
' HTMer_RecordCount为记录集数
' HTMer_PageSize为每页记录数
HTMer_PageCount=Fix(HTMer_RecordCount/HTMer_PageSize)-CInt(CBool(HTMer_RecordCount Mod HTMer_PageSize))
方法一
复制代码 代码如下:
' HTMer_RecordCount为要计算的页面总数
' HTMer_RecordCount为记录集数
' HTMer_PageSize为每页记录数
If HTMer_RecordCount Mod HTMer_PageSize=0 Then
HTMer_PageCount=Int(HTMer_RecordCount/HTMer_PageSize)
Else
HTMer_PageCount=Int(HTMer_RecordCount/HTMer_PageSize)+1
End If
方法二
复制代码 代码如下:
' HTMer_RecordCount为要计算的页面总数
' HTMer_RecordCount为记录集数
' HTMer_PageSize为每页记录数
HTMer_PageCount=Int(HTMer_RecordCount/HTMer_PageSize*-1)*-1
方法三
复制代码 代码如下:
' HTMer_RecordCount为要计算的页面总数
' HTMer_RecordCount为记录集数
' HTMer_PageSize为每页记录数
HTMer_PageCount=Abs(Int(-(HTMer_RecordCount/HTMer_PageSize)))
方法四
复制代码 代码如下:
' HTMer_RecordCount为要计算的页面总数
' HTMer_RecordCount为记录集数
' HTMer_PageSize为每页记录数
HTMer_PageCount=Fix(HTMer_RecordCount/HTMer_PageSize)-CInt(CBool(HTMer_RecordCount Mod HTMer_PageSize))
您可能感兴趣的文章:
相关内容
- asp去除html的函数代码分析附实例说明_应用技巧_
- asp 获取参数值与sql安全过滤参数函数代码_应用技巧_
- ASP中Server.Execute和Execute实现动态包含(include)脚本的区别_应用技巧_
- ASP上传漏洞之利用CHR(0)绕过扩展名检测脚本_应用技巧_
- Asp限制IP访问 阻止某一个IP段禁止访问本站的代码_应用技巧_
- 一个改进的ASP生成SQL命令字符串类的代码[已测]_应用技巧_
- asp在服务器把 XML 转换为 XHTML的实现代码_应用技巧_
- asp提示Server 对象 错误 ASP 0178 : 80070005_应用技巧_
- ASP:ActiveX不能创建Scripting.FileSystemObject对象解决办法_应用技巧_
- asp目录读写权限检测脚本 TestFolder_应用技巧_
