我有这个html,并想遍历dom,并在具有
class="center"
使用jQuery加载页面后。我必须考虑到的是同一页面上具有相同structre的其他html。唯一的区别是它们每个都有唯一的td id。这是html:
<table>
<tr>
<td id="bankname">
<div unselectable="on" style="-webkit-user-select: none; -webkit-tap-highlight-color:
rgba(255, 255, 255, 0); width: 66px; " class=" select-area select-modify_select
select-focus ">
<span class="left"></span>
<span class="center">B.N.S.</span>
<a class="select-opener"></a>
</div>
</td>
<tr>
</table>
最佳答案
$('#bankname span.center').text( newValue );
关于javascript - 使用jQuery遍历dom,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/12632914/