问题
<span id="lblCommande">Bon de commande</span></a>|
<a href="retour.aspx">
This is the link I want to "click" using a button.
I know how to click a button using this:
WebBrowser.OleObject.Document.GetElementByID('ID HERE').Click;
But that doesn'T work for links. Any ideas?
回答1:
Ok I found it. Here's how:
WebBrowser.OleObject.Document.GetElementByID('lblcommande').Click;
来源:https://stackoverflow.com/questions/10593494/programmaticaly-click-on-a-link-in-webbrowser-using-dom-delphi-7