sententia
Home    Blog

Out with document.all and in with document.getElementById

from:  http://www.javascriptkit.com/javatutors/ns6update.shtml

document.all is a proprietary property of IE introduced in IE4 that arguably ushered in the era of DHTML, allowing any element on the page to be accessed and manipulated. This property continues to be supported in IE6, and most likely for the next few versions ahead. However, just because it is supported doesn't mean you should use it. The DOM equivalent of document.all is document.getElementById, and you should use the later whenever possible for cross browser compatibility and ease of maintenance. FYI document.getElementById is supported in IE5 and above, and of course, all other modern browsers such as Firefox and Opera 6+.