//提交窗体
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; 

 
posted on 2010-01-02 22:32  新春  阅读(190)  评论(0编辑  收藏  举报