krivetko-man
Member
- Joined
- Nov 22, 2008
- Messages
- 53
- Reaction score
- 62
- Banned
- #1
Как программно ткнуть на кнопку отправки формы на веб странице?
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.