Writing Different Text to a Page Based on the Browser : Browser Info : Window Browser JAVASCRIPT DHTML TUTORIALS


JAVASCRIPT DHTML TUTORIALS » Window Browser » Browser Info »

 

Writing Different Text to a Page Based on the Browser





<script type="text/javascript">
<!--
  var browser = navigator.appName;
  document.open();
   
  if(browser == "Netscape"){
    document.write("<h2>Welcome <a href='http://www.navioo.com'>navioo.com</a> user.</h2>");
  }else if(browser == "Microsoft Internet Explorer"){
    document.write("<h2>Welcome <a href='http://www.navioo.com'> www.navioo.com</a> user.</h2>");
  }else{
    document.write("<h2>Welcome. But what browser are you using?</h2>")
  }
  document.close();
//-->
</script>


           
       



-

Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .

Follow Navioo On Twitter

JAVASCRIPT DHTML TUTORIALS

 Navioo Window Browser
» Browser Info