<table>
<tr id="next">
<th>id</th>
<th>ch</th>
</tr>
<tr>
<td>1</td>
<td>a</td>
</tr>
<tr id="prev">
<td>2</td>
<td>b</td>
</tr>
</table>
$("#next").nextAll().each(function(){
console.log(this);
})
$("#prev").prevAll().each(function(){
console.log(this);
})
prevAll()是从当前向上获取的,并不是按顺序来的,结果是