当前位置:首页 > ASP教程 > 应用技巧

GetPaing 函数之asp采集函数中用到的获取分页的代码

'==================================================
'函数名:getpaing
'作  用:获取分页
'==================================================
function getpaing(byval constr,startstr,overstr,inclul,inclur)
if constr="$false$" or constr="" or startstr="" or overstr="" or isnull(constr)=true or isnull(startstr)=true or isnull(overstr)=true then
   getpaing="$false$"
   exit function
end if

dim start,over,contemp,tempstr
tempstr=lcase(constr)
startstr=lcase(startstr)
overstr=lcase(overstr)
over=instr(1,tempstr,overstr)
if over<=0 then
   getpaing="$false$"
   exit function
else
   if inclur=true then
      over=over+len(overstr)
   end if
end if
tempstr=mid(tempstr,1,over)
start=instrrev(tempstr,startstr)
if inclul=false then
   start=start+len(startstr)
end if

if start<=0 or start>=over then
   getpaing="$false$"
   exit function
end if
contemp=mid(constr,start,over-start)

contemp=trim(contemp)
contemp=replace(contemp," ","")
contemp=replace(contemp,",","")
contemp=replace(contemp,"'","")
contemp=replace(contemp,"""","")
contemp=replace(contemp,">","")
contemp=replace(contemp,"<","")
contemp=replace(contemp," ","")
getpaing=contemp
end function
【说明】本文章由站长整理发布,文章内容不代表本站观点,如文中有侵权行为,请与本站客服联系(QQ:)!

相关教程推荐

其他课程推荐