There are several methods of ensuring cross-browser functionality with at the major browser vendors. Explore what the userAgent object can do. Included are code samples for determing what browsers visitors to your sites are using.
Cross-browser Functionality with Branching (Page 1 of 3 )
The invention of DHTML has led to a proliferation of easily coded, impressive web pages containing animation and client-side effects. DHTML is easily learnt by building upon a foundation of previously acquired HTML knowledge and it's easily implemented, after all, it's merely a combination of HTML, CSS - a scripting language of choice - and the DOM, or Document Object Model, which is a representation of all of the elements that make up the web page and makes the elements on a page visible to any scripts involved.
This is where the problems start however - with the DOM. Really, it is wrong to say 'the' DOM because in actual fact, each browser has its own implementation of the DOM. So really it's a problem with a DOM, the problem normally being that you've created a blindingly brilliant web site that only one specific browser can access properly. This is a problem that is almost as old as the Internet itself, but fortunately, it is a problem that can be overcome.
There are several methods of ensuring cross-browser functionality with at least the major browser vendors, Microsoft and Netscape. Unfortunately, with the current HTML/DHTML language specifications and browser competitiveness, you're never going to achieve full browser compatibility with all known browsers, but you can at least achieve it with the most popular ones.
Interestingly enough, according to recent figures published by the W3Schools site indicate that currently, the browser market is almost completely dominated by Microsoft’s Internet Explorer; a whopping 71% of visitors to the W3Schools site in August 2004 used Internet Explorer, and while this is only a statistic, and has only captured visitors to one site.