-1
我想單擊表格中的導航鏈接,但無法使其工作。我曾嘗試單擊表內的鏈接
getElementByID
getElementsByClassName
getElementsByTagName
和所有想出空。
這
Set tbls = HTMLDoc.getElementByID("tabToggleTable")
離開
tbls = Nothing
下面是從網站上我在看(特別<td title="Provider Accounting Home Page"
)的部分:
<html>
<head>
<body onhelp="" onload="sfHomePageLoad();" onresize="">
<div id="pagehider">
<table width="100%" height="100%" border="0" cellSpacing="11" cellPadding="0">
<colgroup>
<tbody>
<tr>
<td id="WorkListsColumn">
<td id="TasksColumn">
<table width="100%" height="100%" class="CUI-Table" cellSpacing="0" cellPadding="5">
<tbody>
<tr height="15" class="CUI-SectionTitleBar">
<tr height="40%" class="CUI-Section">
<td style="border-top-color: #6c8cd9; border-top-width: 1px; border-top-style: solid;">
<table width="100%" height="100%" class="CUI-Table" cellSpacing="0" cellPadding="0">
<tbody>
<tr height="15" class="CUI-SectionTitleBar" style="padding-top: 5px; padding-right: 5px; padding-bottom: 5px; padding-left: 5px;">
<tr height="100%" class="CUI-Section">
<td style="border-top-color: #6c8cd9; border-top-width: 1px; border-top-style: solid;">
<div id="PrimaryTasksGrid" style="width: 682px; height: 326px; overflow: auto;">
<table width="100%" style="background-color: white;" border="0" cellSpacing="0" cellPadding="2">
<tbody>
<tr class="CUI-TableGridLinesRow">
<td title="Provider Accounting Home Page" class="CUI-TableGridLinesRow" id=" 39" onmouseover="javascript:colorRow(this)" onmouseout="unColorRow(this)" onmousedown="javascript:colorRowClick(this)" onclick="javascript:nodeOnClick(this);" IgfSessionSecurity="<1" IgfFwdCred="false" IgfText="Provider Accounting Home Page" IgfUrl="../Bin/SmsTntRequest.asp?action=StartBusinessProcess&name=ProviderAccountingHomePage&form=ProviderAccountingHomePage&&GSM=duAuQFBuIBQHBxEpBxP-ALj98ABtQ9rL:XezOC76g7axKlXthZBxb5rrcVbgPa5wMe7QmxBQWL18_" IgfType="2">
<font face="Arial" size="2">
Text - Provider Accounting Home Page
當我嘗試,我得到TD =什麼 – cfuson
@cfuson然後是'HTMLDoc'不是'HTMLDocument'對象,或者HTML是從您發佈的樣本不同。 –
我可以使用Set td = HTMLDoc.getElementsbyTagname(「div」)並獲得響應,如果我嘗試設置td = HTMLDoc.getElementsbyTagname(「table」)它再次沒有任何結果 – cfuson