eft(Trim(""&strStr),32):iMi=intMin:iMa=intMax
If IsNumeric(s) Then
i=CDbl(s)
i=IIf(blnMin=1 And i<iMi,iMi,i)
i=IIf(blnMax=1 And i>iMa,iMa,i)
Else
i=iMi
End If
CheckNum=i
End Function
''''================================================================
'''' 输入:简化条件判断
''''================================================================
Private Function IIf(ByVal blnBool,ByVal strStr1,ByVal strStr2)
Dim s
If blnBool Then
s=strStr1
Else
s=strStr2
End If
IIf=s
End Function
''''================================================================
'''' 上下页部分
''''================================================================
Public Sub ShowPage()%>
<Script Language="JavaScript" type="text/JavaScript" src="<%=sJsUrl%>Cls_jsPage.js"></Script>
<Script Language="JavaScript" type="text/JavaScript">
var s= new Cls_jsPage(<%=iRecCount%>,<%=iPageSize%>,3,"s");
s.setPageSE("<%=sPageName%>=","");
s.setPageInput("<%=sPageName%>");
s.setUrl("");
s.setPageFrist("首页","<<");
s.setPagePrev("上页","<");
s.setPageNext("下页",">");
s.setPageLast("尾页",">>");
s.setPageText("[{$PageNum}]","第{$PageNum}页");
s.setPageTextF(" {$PageTextF} "," {$PageTextF} ");
s.setPageSelect("{$PageNum}","第{$PageNum}页");
s.setPageCss("","","");
s.setHtml("共{$RecCount}记录 页次{$Page}/{$PageCount} 每页{$PageSize}条 {$PageFrist} {$PagePrev} {$PageText} {$PageNext} {$PageLast} {$PageInput} {$PageSelect}");
s.Write();
</Script>
<%End Sub
End Class%>
Cls_jsPage.js
/**
*=================================================================
*Name: 叶子js分页样式(ShowoPage Style With JS)
*RCSfile: Cls_jsPage.js
*Revision: 0.09
*Author: Yehe(叶子)
*Released: 2005-05-12 23:00:15
*Description: js分页样式,显示的翻页结果
*Contact: QQ:311673,MSN:myehe@msn.com
*WebSite: http://www.yehe.org,http://www.showo.com
*=================================================================
*/
function Cls_jsPage(iRecCount,iPageSize,iPageNum,sName){
this.iRC=this.FormatNum(iRecCount,1,0,0,0);//总记录条数
this.iPS=this.FormatNum(iPageSize,1,0,1,0);//每页记录数目
this.iPN=this.FormatNum(iPageNum,0,0,0,0);//显示的前后页数,0为显示所有,负数为这么多页面一个跳转
this.sN=sName;//实例对象名
this.sTPage="{$Page}";//页数
this.sTPageCount="{$PageCount}";//总页数
this.sTRecCount="{$RecCount}";//总记录数
this.sTPageSize="{$PageSize}";//每页记录数
this.sTPageFrist="{$PageFrist}";//首页
this.sTPagePrev="{$PagePrev}";//上页
this.sTPageNext="{$PageNext}";//下页
this.sTPageLast="{$PageLast}";//尾页
this.sTPageText="{$PageText}";//数字跳转
this.sTPageTextF="{$PageTextF}";//数字跳转框架
this.sTPageInput="{$PageInput}";//输入框跳转
this.sTPageSelect="{$PageSelect}";//下拉菜单跳转
this.sTPageNum="{$PageNum}";//数字页数
this.iPC=this.getPageCount();//得到页数
}
//输入 页数开始值,结尾值
Cls_jsPage.prototype.setPageSE=function(sPageStart,sPag