//提交窗体
uses MSHTML;
procedure TForm1.Button1Click(Sender: TObject);
begin
(((WebBrowser1.Document as IHTMLDocument2).body.all as
IHTMLElementCollection).item('key', 0) as IHTMLInputElement
).value := 'zswang';
//提交
(((WebBrowser1.Document as IHTMLDocument2).body.all as
IHTMLElementCollection).item('hlf', 0) as IHTMLFormElement
).submit;
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
WebBrowser1.Navigate('http://search.csdn.net/search.asp');
end;
uses MSHTML;
procedure TForm1.Button1Click(Sender: TObject);
begin
(((WebBrowser1.Document as IHTMLDocument2).body.all as
IHTMLElementCollection).item('key', 0) as IHTMLInputElement
).value := 'zswang';
//提交
(((WebBrowser1.Document as IHTMLDocument2).body.all as
IHTMLElementCollection).item('hlf', 0) as IHTMLFormElement
).submit;
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
WebBrowser1.Navigate('http://search.csdn.net/search.asp');
end;