WEB开发网
开发学院WEB开发ASP 一个在vbscript中读取cookie的程序函数 阅读

一个在vbscript中读取cookie的程序函数

 2001-02-15 10:16:16 来源:WEB开发网   
核心提示:function cookievalue(pcook)lhowlong=len(pcook)lwhereis=instr(document.cookie,pcook)if lwhereis=0 thencookievalue=falseelselstartpos=len(document.cookie)-lwherei
function cookievalue(pcook)
lhowlong=len(pcook)
lwhereis=instr(document.cookie,pcook)
if lwhereis=0 then
cookievalue=false
else
lstartpos=len(document.cookie)-lwhereis-lhowlong
lstartstring=right(document.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

Tags:一个 vbscript 读取

编辑录入:爽爽 [复制链接] [打 印]
赞助商链接