
13.10.2011, 09:26
|
 |
Let Me Show You
|
|
Регистрация: 30.04.2010
Адрес: Северодвинск
Сообщения: 5,426
Версия Delphi: 7, XE5
Репутация: 59586
|
|
Код:
uses
MSHTML,
type
TForm1 = class(TForm)
WebBrowser1: TWebBrowser;
Button1: TButton;
procedure Button1Click(Sender: TObject);
procedure TForm1.Button1Click(Sender: TObject);
var
i: Integer;
elem: IHTMLElement;
document: IHTMLDocument2;
all: IHTMLElementCollection;
begin
WebBrowser1.Navigate('ya.ru');
while WebBrowser1.ReadyState<READYSTATE_COMPLETE do
Application.ProcessMessages;
document:=WebBrowser1.Document as IHTMLDocument2;
all:=document.all;
for i:=0 to all.length-1 do
begin
elem:=all.item(i, '') as IHTMLElement;
if elem.tagName='INPUT' then elem.innerText:='hello world';
end;
end;
http://data.cod.ru/128530
__________________
Пишу программы за еду.
__________________
|