2015-07-28 80 views
-3

如何拍X路徑下面提到的代碼(同一ID &類&型)如何找到的XPath時,它具有相同的ID,等級和類型

<tbody> 

    <tr id="mytr"> 
     <td id="PanelTable" class="menulevel1norm" onclick="PopupWin('Left',divMenuYANTRA_MENU_KEY_10_0,this,'.menuitemp…al','.menuitempopuprowhighlight','','.menuitempopupscroll');" onmouseout="this.className='menulevel1norm'" onmouseover="this.className='menulevel1hl';"></td> 

     <td id="PanelTable" class="menulevel1norm" onmouseout="this.className='menulevel1norm'" onmouseover="this.className='menulevel1hl';" onclick="PopupWin('Left',divMenuYANTRA_MENU_KEY_20_0,this,'.menuitemp…al','.menuitempopuprowhighlight','','.menuitempopupscroll');"></td> 

     <td id="PanelTable" class="menulevel1norm" onmouseout="this.className='menulevel1norm'" onmouseover="this.className='menulevel1hl';" onclick="PopupWin('Left',divMenuYANTRA_MENU_KEY_30_0,this,'.menuitemp…al','.menuitempopuprowhighlight','','.menuitempopupscroll');"></td> 

     <td id="PanelTable" class="menulevel1norm" onmouseout="this.className='menulevel1norm'" onmouseover="this.className='menulevel1hl';" onclick="PopupWin('Left',divMenuYANTRA_MENU_KEY_40_0,this,'.menuitemp…al','.menuitempopuprowhighlight','','.menuitempopupscroll');"></td> 

     <td id="PanelTable" class="menulevel1norm" onclick="PopupWin('Left',divMenuYANTRA_MENU_KEY_50_0,this,'.menuitemp…al','.menuitempopuprowhighlight','','.menuitempopupscroll');" onmouseout="this.className='menulevel1norm'" onmouseover="this.className='menulevel1hl';"></td> 

     <td id="PanelTable" class="menulevel1norm" onclick="PopupWin('Left',divMenuYANTRA_MENU_KEY_60_0,this,'.menuitemp…al','.menuitempopuprowhighlight','','.menuitempopupscroll');" onmouseout="this.className='menulevel1norm'" onmouseover="this.className='menulevel1hl';"></td> 

     <td id="PanelTable" class="menulevel1norm" onclick="PopupWin('Left',divMenuYANTRA_MENU_KEY_70_0,this,'.menuitemp…al','.menuitempopuprowhighlight','','.menuitempopupscroll');" onmouseout="this.className='menulevel1norm'" onmouseover="this.className='menulevel1hl';"></td> 

     <td id="PanelTable" class="menulevel1norm" onclick="PopupWin('Left',divMenuYANTRA_MENU_KEY_80_0,this,'.menuitemp…al','.menuitempopuprowhighlight','','.menuitempopupscroll');" onmouseout="this.className='menulevel1norm'" onmouseover="this.className='menulevel1hl';"></td> 

     <td id="PanelTable" class="menulevel1norm" onclick="PopupWin('Left',divMenuYANTRA_MENU_KEY_81_0,this,'.menuitemp…al','.menuitempopuprowhighlight','','.menuitempopupscroll');" onmouseout="this.className='menulevel1norm'" onmouseover="this.className='menulevel1hl';"></td> 

     <td id="PanelTable" class="menulevel1norm" onclick="PopupWin('Left',divMenuYANTRA_MENU_KEY_90_0,this,'.menuitemp…al','.menuitempopuprowhighlight','','.menuitempopupscroll');" onmouseout="this.className='menulevel1norm'" onmouseover="this.className='menulevel1hl';"></td> 

    </tr> 

</tbody> 
+0

你想要什麼? – Raghavendra

+0

我在上面的代碼中看不到相同的'ID'和'class',並且沒有'type'。所以更好閱讀[如何問](http://stackoverflow.com/help/how-to-ask)。 – Manu

回答

0

您可以通過節點號找到它,爲例如,如果你想選擇第三個節點,這將是這樣的:

(.//td[@id='PanelTable'])[3] 
相關問題