首页 > 开发 > 综合 > 正文

一个在vbscript中读取cookie的程序函数,献给大家(request.cookie(cook

2024-07-21 02:15:36
字体:
来源:转载
供稿:网友
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


发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表