Javascript Navigator appName

by top54u.com 23 Jul, 2008

Javascript navigator appName property returns the name of the client web browser. appName property of Javascript navigator object enables you to run the part of javascript based on the name of the web browser returned by it. You can skip the Javascript code that consists of objects not supported by the client’s browser according to the name of the browser returned by the appName property of navigator object.

 

Syntax for Javascript Navigator appName

 

navigator.appName

or

window.navigator.appName

 

You can use window.navigator also to access the appName property. Both above code syntax for javascript navigator appName objects return the same information about the web browser of the client’s system.

 

Example of JavaScript Navigator appName

 

<script language="javascript" type="text/javascript">

 

document.write(navigator.appName);

</script>

 

Above example of appName property of navigator object returns the following output for different web browsers:

In Internet Explorer navigator.appName returns:

Output: Microsoft Internet Explorer

 

In FireFox navigator.appName returns:

Output: Netscape

 

In Opera web browser navigator.appName returns:

Output: Opera

Add comment


(Will show your Gravatar icon)  

  Country flag

[b][/b] - [i][/i] - [u][/u]- [quote][/quote]



Live preview

10/11/2008 3:26:28 AM




related videos.....
recent posts.....
top54u ezines.....