【发布时间】:2017-08-04 17:44:37
【问题描述】:
我想单击保存按钮,但无法正确引用它以便 VBA 在网页上找到它。我在图像中附加了 HTML 代码,我涂黑了几个部分。我已经在网上搜索并尝试了许多标注来访问此按钮,但 VBA 仍然找不到它。使用 DOM 资源管理器将按钮显示为图像中的蓝色突出显示线。
我可以 SendKeys("TAB") 直到我到达按钮,然后发送一个通用的点击动作,还是我必须按名称引用元素才能点击它?如何引用此保存按钮?我感谢您的帮助。
HTML
<html>
<head>...</head>
<frameset rows="100%,*" cols="*" frameBorder="no" frameSpacing="0" › <frame srcar frameBorder="NO" marginWidth="0" marginHeight="0" scrolling="auto">
<frame src="" frameBorder="NO" marginWidth="0" marginHeight="0" scrolling="auto">
<html>
<head>...</head>
<body aLink="white" onload="readValues(0)" onresize="null">
<form name="frmRptRetrieval" action="" encType="" mehotd="post">
<table width="100%" height="5%" bgColor="•191667" border="0" cellSpacing="0" cellPadding="0">...</table>
<table width="100%" align="center" border="0">...</table>
<img width="20" height="20" alt="notification.gif" src="../images/notification.gif"></img>
<font color="green">Report Retrieval Query saved successfully.</font>
<table width="780" align="center" border="0">
<tbody>
<tr>
<td align="left" rowSpan="1" colSpan="1">
<table width="100%" align="center" border="0">
<tbody>
<tr vAlign="top">...</tr>
<tr>
<td align="center" rowSpan="1" colSpan="1" › <a href="javascript:doSubmit();" shape="">
<img height="18" src="../images/btn_Save.gif" border="0"></img>
</a>
<a href="javascript:clearAll();" shape="">...</a>
【问题讨论】: