How can I find the next item in the current area? For example, I want to find an element div, then the next p?
If I use document.getElementsByTagName('DIV')[0].nextSibling, it returns #text. I want it to return a tag p.
<div>
<table>
<tr>
<td></td>
</tr>
</table>
</div>
<p></p>
source
share