Jump to content

HTML


mhugo
 Share

Recommended Posts

Hi,Another question. Why do I get the appname "Netscape" instead of "Firefox" when running the following code with Firefox to get the browser information.Thank you very much.Regards,Mary<html><head> <title>Exercise 16.1</title></head> <body><script language="JavaScript"> var i document.writeln("The properties of the navigator objects: ") i = 0 for (i in navigator){ document.write("property: " + i + "<br />") document.write(" value: " + navigator+ "<br />") } </script></body></html>

Link to comment
Share on other sites

not sure why but if you look closer at the user agent property it clearly states it is FireFox

If user agent is not changed to MSIE or "My Browser". You can change it whatever You want. :)With this extension it's easy to do: http://chrispederick.com/work/useragentswitcher/Anyway:
if (navigator.userAgent.toLowerCase().indexOf('firefox') != -1) alert('Oh yes, FIREFOX!');

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...