procedure TForm1.WebBrowser1DocumentComplete(Sender: TObject;
const pDisp: IDispatch; var URL: OleVariant);
begin
if not Webbrowser1.Busy then //这句代码的意思是
begin
Doc:=Webbrowser1.Document as IHTMLDocument2; //将Webbrowser1.Document转化为IHTMLDocument2接口
EdCookies.Text:=Doc.cookie; //将获取到的COOKIES放到EdCookies.text里面
end;
end;