1.

Which method is not used for traversing DOM tree?(a) parent()(b) parentsUntil()(c) parents()(d) after()I had been asked this question by my college director while I was bunking the class.This question is from Essential JavaScript and jQuery topic in section HTML Tables, Javascript & Jquery Basics of HTML

Answer»

The CORRECT choice is (d) after()

Best explanation: There are three methods for the traversal of DOM tree. Parent(), parentsUntil(), PARENTS(). Direct parent element is returned by parent() METHOD. All the ancestor elements are returned by parents() method. All the ancestor elements that are between given TWO arguments are returned by parentsUntil() method.



Discussion

No Comment Found

Related InterviewSolutions