i want to know the id names from links inside #nav div, i try to find what id have , but i dont find nothing about this.
A:
You can use XPath expression to get set containing all interesting nodes.
document.evaluate("//div[@id='nav']/a", document, null, XPathResult.UNORDERED_NODE_ITERATOR_TYPE, null)
Code above will return set containing all a elements that are children of div element that has nav id.
Here is working example: http://jsfiddle.net/vycMP/3/
You can read more about XPath here: http://www.w3schools.com/xpath/default.asp
cps7
2010-10-05 15:10:58