用WebBrowse开发了一个浏览器,浏览一些网站时提示:浏览器没有开启Cookie功能,但是,如果用IE来浏览相同的网页,没有相关的提示,为什么会这样?

解决方案 »

  1.   


    资料来源:
    http://www.cryer.co.uk/brian/delphi/twebbrowser/twebbrowser_oleobject.htm#OleObject.Document.cookie
    WebBrowser.OleObject.Document.cookie
    Returns a string holding all browser cookies - these are the cookies stored locally and not server side cookies.Document equivalent:var
      document: IHTMLDocument2;
      cookies: String;
    begin
      document := WebBrowser.Document as IHTMLDocument2;
      if Assigned(document) then
        cookies := document.cookie;
    Cookies are represented in the string in the form:name = value
      

  2.   

    那要是我想得到cookie的值呢?我该如何做?