Mozilla和Netscape [英] Mozilla and Netscape
问题描述
我有一个页面试图学习如何识别浏览器和其他信息。
http://wyght.com/warren/testPos.html
这里是代码
< ; script type =" text / javascript">
var space ="," ;;
var name = navigator.appName;
var codename = navigator.appCodeName;
var version = navigator.appVersion.substring(0,4);
var platform = navigator.platform;
var MyjavaEnabled = navigator.javaEnabled();
var screenWidth = screen.width;
var screenHeight = screen.height;
document.writeln("< BR>" + name + space + codename + space +"< BR>");
document.writeln("< ; BR>" + version + space + platform + spa ce +"< BR>");
document.writeln("< BR>" + MyjavaEnabled +" < BR>" + scree nWid th + space +"< BR>");
document.writeln("< BR>" + screenHeight + space +"< BR>"); < br $> b $ b< / script>
我看不出有什么方法可以知道它是firefox还是netscape浏览器是
posible ?
另外,当我打印出var代号时在IE 6中它说Mozilla。这是什么
?
-
Totus负鼠,总计Deum。
Totus ero,totum meum。
WSW
I have a page up trying to learn how to ID a browser and other info.
http://wyght.com/warren/testPos.html
here is the code
<script type = "text/javascript">
var space = ", ";
var name = navigator.appName;
var codename = navigator.appCodeName;
var version = navigator.appVersion.substring(0,4);
var platform = navigator.platform;
var MyjavaEnabled = navigator.javaEnabled();
var screenWidth = screen.width;
var screenHeight = screen.height;
document.writeln("<BR>"+name+space+codename+space+ "<BR>");
document.writeln("<BR>"+version+space+platform+spa ce+"<BR>");
document.writeln("<BR>"+MyjavaEnabled+"<BR>"+scree nWidth+space+"<BR>");
document.writeln("<BR>"+screenHeight+space+"<BR>") ;
</script>
I can see no way of knowing if it is a firefox or netscape browser is that
posible?
Also, when I print out the var "codename" in IE 6 it says Mozilla. What is
up with that?
--
Totus possum, totum Deum.
Totus ero, totum meum.
WSW
推荐答案
新闻写道:
News wrote:
我有一个页面试图学习如何识别浏览器和其他信息。
除了(不是非常准确)的统计收集目的,这个
信息对你来说应该没有任何实际用途。如果您计划根据不同浏览器的能力分支JavaScript,那么
你应该看看更可靠的对象检测。
http://www.quirksmode.org/js/support.html
我看不出有什么方法可以知道它是firefox还是netscape浏览器是否可以?
不可靠。这些天他们之间几乎没有什么选择。
另外,当我打印出var代号时在IE 6中它说Mozilla。
是什么?
I have a page up trying to learn how to ID a browser and other info.
Except for (not very accurate) statistical gathering purposes, this
information shouldn''t be of any practical use to you. If you are planning
to branch JavaScript based on what different browsers are capable of, then
you should look at the much more reliable object detection.
http://www.quirksmode.org/js/support.html
I can see no way of knowing if it is a firefox or netscape browser is that
posible?
Not reliably. These days there is little to choose between them anyway.
Also, when I print out the var "codename" in IE 6 it says Mozilla. What is
up with that?
Netscape比IE更好的JavaScript支持。人们编写脚本来检测这个问题。微软带来了一个新版本的IE浏览器,支持更好的支持,并将Mozilla卡在代理字符串中,这样那些
脚本就不会忽视IE。
-
David Dorward< http://blog.dorward.me.uk/> < http://dorward.me.uk/>
首页是〜/ .bashrc的位置
Netscape had better JavaScript support then IE. People wrote scripts to
detect this. Microsoft brought out a new version of IE with better
JavaScript support and stuck Mozilla in the agent string so that those
scripts wouldn''t ignore IE.
--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
新闻说如下在2006年2月6日下午4:59:
News said the following on 2/6/2006 4:59 PM:
我有一个页面试图学习如何识别浏览器和其他信息。
除非是纯粹的学术活动,否则浪费时间。
http://wyght.com/warren/testPos.html
错误:
BrowserInfo未定义
这里是代码
这不是您提供URL的页面上的代码。
< script type =" text / javascript">
var space ="," ;;
var name = navigator.appName;
var codename = navigator.appCodeName;
var version = navigator.appVersion.substring(0,4);
var platform = navigator.platform;
var MyjavaEnabled = navigator.javaEnabled();
var screenWidth = screen.width ;
var screenHeight = screen.height;
document.writeln("< BR>" + name + space + codename + space +"< BR>");
document.writeln("< BR>" + version + space + platform + spa ce +"< BR&g t;");
document.writeln("< BR>" + MyjavaEnabled +"< BR>" + scree nWidth + space +"< BR>"); < br。> document.writeln("< BR>" + screenHeight + space +"< BR>");
< / script>
我可以看到无法知道它是firefox还是netscape浏览器是否可以?
可能不是,但除非这是纯粹的学术性的b
锻炼,否则无所谓。
另外,当我打印时var代号在IE 6中它说Mozilla。
是什么?
I have a page up trying to learn how to ID a browser and other info.
Unless it is a purely academical exercise it is a waste of time.
http://wyght.com/warren/testPos.html
Error:
BrowserInfo is undefined
here is the code
That is not the code you have on the page you gave the URL to.
<script type = "text/javascript">
var space = ", ";
var name = navigator.appName;
var codename = navigator.appCodeName;
var version = navigator.appVersion.substring(0,4);
var platform = navigator.platform;
var MyjavaEnabled = navigator.javaEnabled();
var screenWidth = screen.width;
var screenHeight = screen.height;
document.writeln("<BR>"+name+space+codename+space+ "<BR>");
document.writeln("<BR>"+version+space+platform+spa ce+"<BR>");
document.writeln("<BR>"+MyjavaEnabled+"<BR>"+scree nWidth+space+"<BR>");
document.writeln("<BR>"+screenHeight+space+"<BR>") ;
</script>
I can see no way of knowing if it is a firefox or netscape browser is that
posible?
Probably not but it shouldn''t matter unless this is a purely academical
exercise.
Also, when I print out the var "codename" in IE 6 it says Mozilla. What is
up with that?
对于那些错误地认为导航器中有任何东西的人来说
对象意味着什么什么,包括托马斯拉恩。对于
来说,除了学术练习之外什么都没用。
对于它的价值,这就是我的浏览器为此提供的内容代码:
Netscape,Mozilla,
5.0,Win32,
它是什么浏览器?
-
兰迪
comp.lang.javascript常见问题 - http://jibbering.com/faq &新闻组每周
Javascript最佳实践 - http://www.JavascriptToolbox .com / bestpractices /
It''s for people who mistakenly think that anything in the navigator
object means anything and that includes Thomas Lahn. It''s useless for
anything but an academic exercise.
For what it''s worth, this is what one of my browsers gives for that code:
Netscape, Mozilla,
5.0 , Win32,
What browser is it?
--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
" David Dorward" <做***** @ yahoo.com>在消息中写道
news:ds ******************* @ news.demon.co.uk ...
"David Dorward" <do*****@yahoo.com> wrote in message
news:ds*******************@news.demon.co.uk...
新闻写道:
News wrote:
我有一个页面试图学习如何识别浏览器和其他信息。
I have a page up trying to learn how to ID a browser and other info.
除了(不非常准确的)统计收集目的,这个信息不应该对你有任何实际用处。如果你计划根据不同的浏览器能够分支JavaScript,那么你应该看看更可靠的对象检测。
http://www.quirksmode.org/js/support.html
我看不出有什么方法可以知道它是firefox还是netscape浏览器
是否可用?
I can see no way of knowing if it is a firefox or netscape browser is
that
posible?
不可靠。这些天无论如何都很难在它们之间做出选择。
Not reliably. These days there is little to choose between them anyway.
此外,当我打印出var代号时。在IE 6中它说Mozilla。
是什么?
Also, when I print out the var "codename" in IE 6 it says Mozilla. What
is
up with that?
Netscape比IE更好的JavaScript支持。人们编写脚本来检测这个。微软推出了一个新版本的IE,支持更好的JavaScript,并将Mozilla粘贴在代理字符串中,这样那些脚本就不会忽视IE。
-
首页是〜/ .bashrc
Netscape had better JavaScript support then IE. People wrote scripts to
detect this. Microsoft brought out a new version of IE with better
JavaScript support and stuck Mozilla in the agent string so that those
scripts wouldn''t ignore IE.
--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
感谢网址有用
Totus负鼠,总计Deum。
Totus ero,totum meum。
WSW
Thanks that URL was helpful
Totus possum, totum Deum.
Totus ero, totum meum.
WSW
这篇关于Mozilla和Netscape的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!