读取cookies;if Request.CookieFields.Values['CookieField1']<>'' then Response.Content :='The value for CookieField1 is ' + Request.CookieFields.Values['CookieField1'] + ''elseResponse.Content := 'Where is the cookie?';//设置cookies;var slstCookie: TStringList;beginslstCookie := TStringList.Create;try with slstCookie do begin Clear; Append('CookieExample=ACookie'); Append('CookieField1=Value1'); Append('CookieField2=Value2'); end; Response.SetCookieField (slstCookie, '', '/scripts',-1,False); Response.Content := 'Cookie has been set. Thank you!'; finally slstCookie.Free;end;end;//域名转向;var slstCookie:TStringList;beginslstCookie := TStringList.Create;try with slstCookie do begin Clear; Append('CookieExample=ACookie'); Append('CookieField1=Value1'); Append('CookieField2=Value2'); end; Response.SetCookieField (slstCookie, '', '/scripts',-1,False); Response.SendRedirect ('http://localhost/scripts/chapter9.dll/get');finally slstCookie.Free;end;end;