The distinction between standard and live is usually used for item lists. document.getElementById returns a reference to a single object on the DOM node. After receiving the node, the link will always point to the same node.
HTML for example: <div id="foo"></div>
JS for example: var foo, bar; foo = document.getElementById('foo'); //gets the div bar = document.getElementById('bar'); //null foo.setAttribute('id', 'bar'); console.log(foo.id); //'bar' console.log(bar.id); //TypeError
Links are not updated because the identifier of an element can be changed.
This contrasts with something like document.getElementsByTagName , which returns a list of elements with the specified tag. The list will be automatically updated when items are added or removed from the DOM.
source share