procedure TForm1.Getbody;
var
  str1:string;
begin
    str1:=IHtmlDocument2(WebBrowser1.Document).body.outerText;
    Showmessage(str1);
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
   Getbody;
end;用上面的方法报错额,求各位大大帮帮忙,搞不定工作都要没了.... 
报错如下: 
 project project21.exe raised exception class EAccessViolation with message 'AccessViolation at address 0045FBC6 in module'.read of address 00000000

解决方案 »

  1.   

    自己搞定了,忘了 输入url 
      

  2.   

    procedure TForm1.Button4Click(Sender: TObject);
    var
      strTmp: string;
    begin
      strTmp := IdHTTP1.Get('http://stock.business.sohu.com/p/pf.php?pf=1');end;
      

  3.   

    楼上正解,也可以用POST方式的,
    var
      strList: TStringList;
      strTmp: string;
    begin
      strList := TStringList.create;
      strList.Add('pf=1');
      strTmp := IdHTTP1.Post('http://stock.business.sohu.com/p/pf.php', strList); 
    end;