chuvak
06-26-2003, 01:26 PM
Hi,
does getElementById(...) sequentially go through all the ID's on the page to find the element?
How are the ID's stored? Is it only array of the elements that have explicitly defined id="..." or something else?
Is it much faster to give id's to all of the element's parents and then get element by document.parent1.parent2....parentN.ID?
Of course going through 100 or 1000 elements is very fast on computers nowadays, but on an embedded device (which is the issue in my case) it might make a difference.
Also can someone point me to a good reference on the DOM?
thanks in advance
does getElementById(...) sequentially go through all the ID's on the page to find the element?
How are the ID's stored? Is it only array of the elements that have explicitly defined id="..." or something else?
Is it much faster to give id's to all of the element's parents and then get element by document.parent1.parent2....parentN.ID?
Of course going through 100 or 1000 elements is very fast on computers nowadays, but on an embedded device (which is the issue in my case) it might make a difference.
Also can someone point me to a good reference on the DOM?
thanks in advance