WebBrowser и Delphi

krivetko-man

Member
Joined
Nov 22, 2008
Messages
53
Reaction score
62
Как программно ткнуть на кнопку отправки формы на веб странице?
 

asm64d

Member
Joined
Jun 14, 2008
Messages
946
Reaction score
9,629
Минутная разминка:
Code:
unit Unit1;

interface

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

type
  TForm1 = class(TForm)
    Button1: TButton;
    WebBrowser1: TWebBrowser;
    BitBtn1: TBitBtn;
    procedure Button1Click(Sender: TObject);
    procedure BitBtn1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
begin
WebBrowser1.Navigate('www.ya.ru');
end;

procedure TForm1.BitBtn1Click(Sender: TObject);
begin
   Webbrowser1.OleObject.Document.All.Tags('INPUT').Item(0).Value:='dumpz.ru';
   Webbrowser1.OleObject.Document.All.Tags('INPUT').Item(2).Click();
end;

end.
Можно и подругому, главное чтобы принцип был понятен.
 

sergey-12

New member
Joined
Mar 10, 2007
Messages
2
Reaction score
0
"Hey, I used to deal with Delphi back in the day and I think the best web browser control for it was Indy, hands down. It allowed for pretty easy HTTPS support and was relatively low maintenance. Does anyone know if there's an equivalent for modern browsers?"
 
Top