VBScript得到Cookie


'頁面中要加上此句
<!--
#include file="CookieLib.asp" -->

<%
Dim  allCookie,sUnique_ID,sName,sUniqueID,sId,sVal,sUrl
' 得到所有Cookie值
allCookie  = Request.Cookies

' 輸出Cookie值
if (allcookie <> "" then
  response.write(allcookie)
end   if

response.write( " <br>----------<br> " )
 Response.Write   
" <script   language=""javascript""> window.location.href; </script> "
response.write(
" <br>----------<br> " )
' 得到指定的Cookie值
sName = GetCookie( " _AUTOWEBCOOKIE_EIP_C_B " , " NAME " )
sUniqueID
= GetCookie( " _AUTOWEBCOOKIE_EIP_C_B " , " Unique_ID " )
sId
= GetCookie( " _AUTOWEBCOOKIE_EIP_C_B " , " ID " )

if (sName <> "" then
 response.write(sName
+ " <br> " )
 
' 本站內頁面跳轉方法1
  ' response.redirect "test_cookie.asp"
   ' 本站內頁面跳轉方法2
  ' Response.Write   "<script   language=""javascript"">parent.location.href=""test_cookie.asp"";</script>"
  ' 其它網站跳轉   'Response.Write   "<script   language=""javascript"">window.location.href=""http://www.baidu.com"";</script>"

end   if


if (sUniqueID <> "" then
 response.write(sUniqueID
+ " <br> " )
end   if

if (sId <> "" then
 response.write(sId
+ " <br> " )
end   if

 
Set  PageGen = Server.CreateObject( " AutoShop.PageGenerator "
if  ( not  PageGen.Run( " EIP " , " C_B " , " Main " ))  then
end   if

%>





你可能感兴趣的:(VBScript)