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
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
var
strTmp: string;
begin
strTmp := IdHTTP1.Get('http://stock.business.sohu.com/p/pf.php?pf=1');end;
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;