1 2 // If there is only one button, you can do something like: 3 4 WebBrowser1.OleObject.Document.forms.item(0).elements.item(0).click;
5 6 // This will do a click on the first element of the first <FORM>, where an 7 // element is either <INPUT>, <SELECT> or <TEXTAREA>. 8 9 10 // If there is more than one button, you can do something like: 11 12 procedure TForm1.Button1Click(Sender: TObject);
13 var14 ovElements: OleVariant;
15 i: Integer;
16 begin17 ovElements := WebBrowser1.OleObject.Document.forms.item(0).elements;
18 for i := 0 to (ovElements.Length - 1) do19 if (ovElements.item(i).tagName = 'INPUT') and20 (ovElements.item(i).type = 'SUBMIT') and21 (ovElements.item(i).Value = 'Recent Charges') then22 ovElements.item(i).Click;
23 end;
24