|
Post by Schubaltz on Feb 23, 2008 17:42:14 GMT -5
Description: Is there any need?
Syntax: descendHierarchy(reference Node, [,offset])
function descendHierarchy(a) { var x = 1; while(x < arguments.length) { if(!a.childNodes[arguments[x]]) return false; a = a.childNodes[arguments[x]]; x ++; } return a; }
Example:
<html> <head></head> <body><div><b>hello <i>world</i></b></div> <script> descendHierarchy(document.body, 3, 1, 1); // object Text ("world") </script> </body> </html>
|
|