JavaScript取得下一个对象或父对象

parentElement 父

parentNode 父

childNodes[] 子

nextSibling 兄弟

previousSibling

例子:

<table >第二个单元格</td>

</tr>

</table>