Source Code:
(back to article)
Submit
Result:
Report an issue
<div id="example">Example node</div> <script> const node = document.getElementById("example"); node.innerHTML = 'Node type is: ' + node.nodeType; </script>