Delphi TWebBrowser 识别按钮已启用

Delphi TWebBrowser identify button enabled

网站使用Ajax,按钮只有在选择两个组合框后才会启用。

如何识别站点按钮是启用还是禁用?

干杯。

使用浏览器的 DOM 界面访问按钮元素。页面加载后,您可以查询 TWebBrowser.Document 属性 以获取 IHTMLDocument2 interface, drill down to the desired button element, query it for the IHTMLElement3 or IHTMLButtonElement 界面,然后读取其 disabled 属性.