Instead of the loop, I prefer XPath queries to extract elements from the DOM:
var query = "//td[@class='nodelets']"; var nodesSnapshot = document.evaluate(query, document, null, XPath +Result.ORDERED_NODE_SNAPSHOT_TYPE, null ); for ( var i=0 ; i < nodesSnapshot.snapshotLength; i++ ) { var elt = nodesSnapshot.snapshotItem(i); // handle elt };
In reply to Re^2: Nodelets on the left?
by Corion
in thread Nodelets on the left?
by Argel
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |