确定是否在IE中禁用了HTML按钮

胡安

我最近正在做一些VBA上班,我需要在网页中签入以单击按钮(如果启用),而不单击(如果禁用)。

但!我不知道如何使VBA检查禁用的按钮。

这是按钮代码:

<input name="formAction:proxima" title=">" disabled="disabled" class="button" id="FormAction:proxima" type="submite" value=">">

我尝试了一些If,但没有成功

    Set nxt = IE.document.getElementById("formAction:proxima")

    If nxt Is Nothing Then
        IE.Quit
    Else
        nxt.Click
    End If
狄克斯

您也可以使用.disabled属性(布尔)

Dim nxt As HTMLButtonElement
Set nxt = IE.document.getElementById("formAction:proxima")

If nxt.disabled Then
    ie.Quit
Else
    nxt.Click
End If

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章