Use userAgent to get the browser type
<html> <head> </head> <body> <script type="text/javascript"> var browserType = navigator.userAgent.toLowerCase(); if(browserType.indexOf('mozilla')){ document.write("Netscape Navigator"); }else if (browserType.indexOf('msie')){ document.write("Microsoft Internet Explorer"); }else if (browserType.indexOf('opera')){ document.write("Opera"); }else if (browserType.indexOf('webtv')){ document.write("Web TV"); } document.close() </script> </body> </html>