Find Browser Name using JavaScript | Coding Cluster - using asp.net, c#, mvc 4, iphone, php, ios, javascript, in asp.net mvc 3 & more
 

Find Browser Name using JavaScript

Saturday

 Find the browser name using javascript
Hi folks,
             Browser detection allows you to find out what browser your  using.The following javascript function used to find the browser type.

There are two objects often used for this, the navigator.appName and navigator.appVersion objects. The first one returns the name of the browser, the second returns the version of the browser.

Code: 

function findBrowser()
  {
    var browserName=navigator.appName;
    if (browserName=="Netscape")
    {
      alert("Hi You are a Netscape User!");
    }
    else
    {
      if (browserName=="Microsoft Internet Explorer")
      {
        alert("Hi, Your are an Explorer User!");
      }
      else
      {
        alert("????");
      }
    }

  }

0 comments:

Post a Comment

Share your thoughts here...

 
 
 

RECENT POSTS

Boost

 
Blogger Widgets