document.all is an obsolete proprietary method from Microsoft. Do not use it.
document.getElementsByTagName('*') is the standard W3C method for finding all the elements in a document - and, of course, the fastest - and it works in Internet Explorer.
PS . When someone is required to call back and provide a jQuery answer to this question, how to select all the elements on the page using jQuery: jQuery('*');
:-)
source share