Einzelnen Beitrag anzeigen

Kidix

Registriert seit: 14. Jan 2005
315 Beiträge
 
Delphi 4 Standard
 
#18

Re: HTML-Code von TMozillaBrowser auslesen

  Alt 26. Jul 2005, 11:58
Hier der Quelltext eines Testprojektes:

Delphi-Quellcode:
unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, OleCtrls, MOZILLACONTROLLib_TLB;

type
  TForm1 = class(TForm)
    browser1: TMozillaBrowser;
    Button1: TButton;
    procedure Button1Click(Sender: TObject);
    procedure FormShow(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
begin
ShowMEssage(Browser1.OleObject.Document.documentElement.innerHTML);
end;

procedure TForm1.FormShow(Sender: TObject);
begin
browser1.Navigate('http://www.yeho.de');
end;

end.
  Mit Zitat antworten Zitat