我需要使用VBA代码点击href" 2" (第二页) 由于没有ID名称,我无法使用
ie.document.getElementById("ctl00_ContentPlaceHolder1_searchResults_searchResultsGrid_imgExportExcel").Click option
<div id="ctl00_ContentPlaceHolder1_searchResults_searchResultsGrid_pagingButtonsPanel">
<span class="gridPagerPageLinkCurrent" 1 ></span>
<a class="gridPagerPageLink" href="javascript:__doPostBack('ctl00$ContentPlaceHolder1$searchResults$searchResultsGridPAGE', 2)" target="_self" 2 ></a>
</div>
答案 0 :(得分:0)
尝试:
ie.document.getElementById( _
"ctl00_ContentPlaceHolder1_searchResults_searchResultsGrid_imgExportExcel") _
.getElementsByTagName("a")(0).Click