确定是否在IE中禁用了HTML按钮 [英] Determining if HTML Button is Disabled in IE
本文介绍了确定是否在IE中禁用了HTML按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我最近正在做一些VBA上班,我需要在网页上签入以单击按钮(如果已启用),而不单击(如果已禁用).
I'm doing some VBA recently for work and I need to check in a webpage to click a button if is enable and don't click if is disabled.
但是!我不知道如何让VBA检查已禁用的按钮.
BUT! I don't know how to make VBA check the disabled button.
这是按钮代码:
<input name="formAction:proxima" title=">" disabled="disabled" class="button" id="FormAction:proxima" type="submite" value=">">
我尝试了一些If,但没有成功
I tried some If, but didn't work
Set nxt = IE.document.getElementById("formAction:proxima")
If nxt Is Nothing Then
IE.Quit
Else
nxt.Click
End If
推荐答案
您还可以使用.disabled
属性(Boolean).
Dim nxt As HTMLButtonElement
Set nxt = IE.document.getElementById("formAction:proxima")
If nxt.disabled Then
ie.Quit
Else
nxt.Click
End If
这篇关于确定是否在IE中禁用了HTML按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文