IE中的对象未被VBA识别

时间:2017-10-30 06:52:56

标签: excel-vba vba excel

Iam尝试使用VBA自动化IE浏览器。浏览器页面中有近25个链接,但是当我使用 getElementsByTagName(" a")功能时,VBA只识别页面中的2个链接。我使用IE 8和MS Office 2007包。 有没有人早先遇到同样的问题。请帮助

        <form name="form1" action="/insurance/gs/servlet/API.gs.pol.nb.action.NewBizAction" method=post>
  <input type="hidden" name='operId' value="">
   <input type="hidden" name="policyId" value = "309865">
  <input type="hidden" name='isCustomer' value="1">
  <input type="hidden" name='indDeletePartyId' value="">
  <input type="hidden" name='orgDeletePartyId' value="">
  <input type="hidden" name='deletePartyId' value="">
  <input type="hidden" name='roleType' value="">
  <input type="hidden" name='submissionCustId' value="0">
  <input type="hidden" name='newPartyId' value="null">
  <input value="API.gs.pol.nb.action.NewBizAction?operId=LoaderCustInfo&policyId=309865" type="hidden" name="fromUrl" >
  <table cellpadding="1" cellspacing="1" class="table_frame">
    <tr>
      <td class="body">
        <div class="main">
          <table width="100%" border="0" cellspacing="0" cellpadding="0" class="table_data">
            <tr>
              <td>
                <table border="0" cellspacing="0" cellpadding="0" class="table_heading1">
                  <tr>
                    <td class="table_heading1_tdleft table_heading1_tdpic"></td>
                    <td class="table_heading1_td">
                      <table border="0" cellspacing="0" cellpadding="0" class="table_heading1_1">
                        <tr>
                          <td class="arrow_td"><img src="/insurance/icp/ifoundation/html/foundation/ui31/images/common/arrow1.gif" /></td>
                          <td width="49%" nowrap="nowrap" class="font_heading1">
                            Customer List
                          </td>
                          <td width="49%" align="right" >

                            <a class="a2" href="#" onClick="javascript:if(cheBefSelCust()){loadIndiCust()}">Individual</a>
                            <a class="a2" href="#" onClick="javascript:if(cheBefSelCust()){loadOrganCust()}">Company</a>

                          </td>
                        </tr>
                      </table>
                    </td>
                    <td class="table_heading1_tdright table_heading1_tdpic"></td>
                  </tr>
                </table>

在上面的HTML页面中,我想选择链接个人

0 个答案:

没有答案