·您现在的位置: 云翼网络 >> 文章中心 >> 网站建设 >> 网站建设开发 >> ASP网站建设 >> 一个在vbscript中读取cookie的程序函数

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

作者:佚名      ASP网站建设编辑:admin      更新时间:2022-07-23
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