繁体中文
设为首页
加入收藏
当前位置:ASP技术首页 >> ASP基础 >> 一个在vbscript中读取cookie的程序函数,献给大家(request.cookie(cookiename)不行),见

一个在vbscript中读取cookie的程序函数,献给大家(request.cookie(cookiename)不行),见

2006-04-15 08:00:00  作者:  来源:互联网  浏览次数:0  文字大小:【】【】【
简介:function cookievalue(pcook) lhowlong=len(pcook) lwhereis=instr(documents.cookie,pcook) if lwhereis=0 then cookievalue=false else lstartpos=len(documents.cookie)-lwhereis-lhowlong lstartstrin...

function cookievalue(pcook)

lhowlong=len(pcook)

lwhereis=instr(documents.cookie,pcook)

if lwhereis=0 then

cookievalue=false

else

lstartpos=len(documents.cookie)-lwhereis-lhowlong

lstartstring=right(documents.cookie,lstartpos)

do

lchar=left(lstartstring,1)

if lchar=";" then

cookievalue=lendstring

exit do

else

lendstring=lendstring & lchar

if len(lstartstring)=1 then

cookievalue=lendstring

exit do

else

lstartstring=right(lstartstring,len(lstartstring)-1)

end if

end if

loop

end if

end function

责任编辑:admin
相关文章