Alert User Depending On Browser

 
 
Alert user, depending on browser
 
 
  1. <html>

  2. <head>

  3. <script type="text/javascript">

  4. function detectBrowser()

  5. {

  6. var browser=navigator.appName;

  7. var b_version=navigator.appVersion;

  8. var version=parseFloat(b_version);

  9. if ((browser=="Netscape"||browser=="Microsoft Internet Explorer") && (version>=4))

  10.   {

  11.   alert("Your browser is good enough!");

  12.   }

  13. else

  14.   {

  15.   alert("It's time to upgrade your browser!");

  16.   }

  17. }

  18. </script>

  19. </head>

  20.  

  21. <body onload="detectBrowser()">

  22. </body>

  23.  

  24. </html>
 
Copy to Clipboard      Download code as Text Format
 
  Date entered : 25th Mar 2008
  Rating : No Rating
  Accessed  :  1248
  Submitted by :  goldeekhan
 
   Add Comment  Printer friendly
   View All Comments  Email to a friend
   Add to my Favourites Download PDF version
   Rating  
 
                 Click each image to add
this page to each site.
 
 
 
Comments Available

    No comment available at the moment.Be the first one to make a comment

 
Related JavaScript Source Codes
  • Spring
  • Wraps a string to a given number of characters using a string break character
  • Uppercase the first character of each word in a string
  • Make a string's first character uppercase
  • Strip whitespace (or other characters) from the beginning and end of a string

  • Copyright © 2010 VisualBuilder. All rights reserved