delphi可否让IE自动执行网页按钮的click事件?

解决方案 »

  1.   

    用SendMessage或者写个插件什么的
      

  2.   

    press a button in a TWebbrowser when there are multiple buttons in the same form?  
    procedure TForm1.Button1Click(Sender: TObject);
    var 
      ovElements: OleVariant; 
      i: Integer; 
    begin 
      ovElements := WebBrowser1.OleObject.Document.forms.item(0).elements; 
      for i := 0 to (ovElements.Length - 1) do
        if (ovElements.item(i).tagName = 'INPUT') and
          (ovElements.item(i).type = 'SUBMIT') and
          (ovElements.item(i).Value = 'Recent Charges') then
          ovElements.item(i).Click; 
    end;
      

  3.   

    连接到IE的方法可以参考
    www.codeproject.com/shell/AutomateShellWindow.asp