能否请您告知我如何启动IE网站[VBA]上的“PressHERE”按钮上的[或替代方法]?我试图通过类名,标记名甚至ID来调用它,而这些ID在网站源代码中没有提到。
<tr>
<td class="center edl_checkbox" style="padding-left: 15px;">
<input type="hidden" name="_orgSearchResultList[1].isSelected">
<label class="edl_chb">
<input type="checkbox" id="1" name="orgSearchResultList[1].isSelected" value="true" />
<span></span>
</label>
</td>
<td class="center">
<a href="#" onclick="javascript:doSubmit('Edit-1');" title="PressHERE">
PressHERE
</a>
<input type="hidden" id="Org1" value="PressHERE"/>
</td>
<td class="center" title="PressHERE">
PressHERE
在站点上“检查元素”时突出显示的特定行是:
<td class="center"><a href="#" onclick="javascript:doSubmit('Edit-1');" title="PressHERE">PressHERE
最佳答案
试试这个,让我们知道反馈。
Dim IE As New InternetExplorer, Html As HTMLDocument
Set Html = IE.document 'consider adding this line in your script in order for `.querySelector()` to run successfully
Html.querySelector("a[title='PressHERE']").Click