发布时间:2013-09-19 11:33:46来源:阅读(2049)
Response.Cookies("CookieName")=value |
Response.Cookies("VisitorName")="Ken" |
Response.Cookies("VisitorName")=Request.Form("UserName") |
Request.Cookies("CookieName") |
MyVar=Request.Cookies("KensCookie") |
If Request.Cookies("KensCookie")="Yes" then... |
Response.Cookies("VisitorName")("FirstName")="Ken" Response.Cookies("VisitorName")("LastName")="Baumbach" |
Response.Cookies("CookieName").Domain = "www.mydomain.com" |
Response.Cookies("CookieName").Path = "/maindir/subdir/path" |
Response.Cookies("CookieName").Expires=#January 01, 2010# |
Response.Cookies("CookieName")=Date+365 |
< %@ LANGUAGE="VBSCRIPT" % > < % Survey=Request.Cookies("KensSurvey") If Survey ="" then Response.Cookies("KensSurvey")="x" Response.Cookies("KensSurvey").Expires=#January 01, 2010# Response.Redirect "survey.asp" Else 'rest of the page End if % > |
< %@ LANGUAGE="VBSCRIPT" % > < % Survey=Request.Cookies("KensSurvey") |
If Survey ="" then |
Response.Cookies("KensSurvey")="x" Response.Cookies("KensSurvey").Expires=#January 01, 2010# Response.Redirect "survey.asp" |
'rest of the page End if %> |
< %@ LANGUAGE="VBSCRIPT" % > < % RequestName = Request.Form("Name") RequestLeaveMeAlone = Request.Form("LeaveMeAlone") If RequestName < >"" or RequestLeaveMeAlone < >"" then Response.Cookies("MySiteVisitorName") = RequestName Response.Cookies("MySiteVisitorName").Expires = #January 01, 2010# Response.Cookies("MySiteLeaveMeAlone") = RequestLeaveMeAlone Response.Cookies("MySiteLeaveMeAlone").Expires = #January 01, 2010# End if VisitorName = request.cookies("MySiteVisitorName") LeaveMeAlone = request.cookies("MySiteLeaveMeAlone") If VisitorName ="" and LeaveMeAlone ="" then % > < HTML > < HEAD > < /HEAD > < body bgcolor="#ccffff" text="black" link="navy" vlink="purple" > < DIV ALIGN="CENTER" > < form action="index.asp" method="POST" > < H2 >Let's be friends< /H2 > What's your name (leave blank and hit the Submit button if you don't want us to know)? < input type="text" name="name" >< BR >< BR > < input type="hidden" name="LeaveMeAlone" value="x" > < input type="submit" value="Submit" > < /FORM > < /DIV > < /BODY > < % End if If VisitorName < > "" then Response.write "Hi, " & VisitorName & "! I hope you are having a great day!" End if 'rest of the page % > |
< %@ LANGUAGE="VBSCRIPT" % > < % RequestName = Request.Form("Name") RequestLeaveMeAlone = Request.Form("LeaveMeAlone") If RequestName < >"" or RequestLeaveMeAlone < >"" then Response.Cookies("MySiteVisitorName") = RequestName Response.Cookies("MySiteVisitorName").Expires = #January 01, 2010# Response.Cookies("MySiteLeaveMeAlone") = RequestLeaveMeAlone Response.Cookies("MySiteLeaveMeAlone").Expires = #January 01, 2010# End if |
VisitorName = request.cookies("MySiteVisitorName") LeaveMeAlone = request.cookies("MySiteLeaveMeAlone") |
If VisitorName ="" and LeaveMeAlone ="" then % > < HTML > < HEAD > < /HEAD > < body bgcolor="#ccffff" text="black" link="navy" vlink="purple" > < DIV ALIGN="CENTER" > < form action="index.asp" method="POST" > < H2 >Let's be friends< /H2 > What's your name (leave blank and hit the Submit button if you don't want us to know)? < input type="text" name="name" >< br >< br > < input type="hidden" name="LeaveMeAlone" value="x" > < input type="submit" value="Submit" > < /FORM > < /DIV > < /BODY > < % End if |
If VisitorName < > "" then Response.write "Hi, " & VisitorName & "! I hope you are having a great day!" End if 'rest of the page % > |
关键字:
上一篇: 教你5分钟做成一个ASP论坛
下一篇: asp作品保护方案
1941
1591
1334
1480
924
1553
1727
1560
1903
1827
9593
5996
5523
5116
4567
4274
3415
3336
3335
3269