uses mshtml;
procedure TForm1.wb1DocumentComplete(Sender: TObject; const pDisp: IDispatch; var URL: OleVariant);
var
i:Integer;
iall : IHTMLElement;
begin
if wb1.Application = pDisp then
begin
mmo1.Clear;
if Assigned(wb1.Document) then
begin
iall := (wb1.Document AS IHTMLDocument2).body;
while iall.parentElement <> nil do
begin
iall := iall.parentElement;
end;
mmo1.Text := mmo1.Text+iall.outerHTML;
end;
end;
end;
读者留言 0 条
一纸留言,便是山水间的一次相逢。
还没有留言,欢迎写下第一段交流。