<table class="list members">
<thead>
<tbody>
<tr id="member-141568" class="odd member">
<td class="name user">
<td class="roles">
<td class="buttons">
</tr>
<tr id="member-141576" class="even member">
<td class="name user">
<td class="roles">
<td class="buttons">
</tr>
<tr id="member-141573" class="odd member">
<td class="name user">
<a class="user active" href="https://stackoverflow.com/users/144550">Kay Kay</a>
</td>
<td class="roles">
<td class="buttons">
<a class="icon icon-edit" onclick="$('#member-141573-roles').hide(); $('#member-141573-roles-form').show(); return false;; return false;" href="#">Edit</a>
<a class="icon icon-del" href="/memberships/141573" data-method="delete" rel="nofollow" data-remote="true">Delete</a>
</td>
</tr>
</tbody>
</table>
主要的想法是讓編輯按鈕在現場列表特定用戶。 那麼如何爲特定用戶(//a[@class="user active" and text()="Kay Kay"]
)獲取「編輯」元素(//a[@class="icon icon-edit" and text()='Edit']
)?
完美! 它的工作原理!非常感謝! –