DOM Enlightenment Book

by domenlightenment

HTML

<script src="https://getfirebug.com/firebug-lite-debug.js"></script>
<p id="p1"></p> //yes there is a carriage return text node before this comment, even this comment is a node
<p id="p2"></p>

JavaScript

console.log(document.querySelecgtor('#p1').nextSibling) //logs Text