Ask HN: What does "node" refer to in javascript code on this page? 2 points by zeynel1 15y ago ↗ HN I am trying to understand the javascript on this page to copy it for my app to use for voting. So any help is appreciated. Thanks.
[–] coderdude 15y ago ↗ Node refers to an HTML element.HTML element: <p id="fun">test</p>JS to get a pointer to that element: var node = document.getElementById("fun");node.id = "really_fun";How that affects the HTML element: <p id="really_fun">test</p> [–] zeynel1 15y ago ↗ Thanks. I am also reading this http://www.quirksmode.org/dom/intro.html
2 comments
[ 3.5 ms ] story [ 16.2 ms ] threadHTML element: <p id="fun">test</p>
JS to get a pointer to that element: var node = document.getElementById("fun");
node.id = "really_fun";
How that affects the HTML element: <p id="really_fun">test</p>