I'm just reading this documentation about Javascript 1.2, but I'm wondering which version of Javascript is being used in the most popular browsers.
我正在阅读有关Javascript 1.2的文档,但我想知道在最流行的浏览器中使用了哪个版本的Javascript。
http://www.tutorialspoint.com/javascript/javascript_nested_functions.htm
http://www.tutorialspoint.com/javascript/javascript_nested_functions.htm
6 个解决方案
#1
35
Wikipedia (or rather, the community on Wikipedia) keeps a pretty good up-to-date list here.
*(或者更确切地说,*上的社区)在这里保存了一个很好的最新列表。
- Most browsers are on 1.5 (though they have features of later versions)
- 大多数浏览器都是1.5版(尽管它们有后来版本的特性)
- Mozilla progresses with every dot release (they maintain the standard so that's not surprising)
- Mozilla的每一个版本都有进展(他们保持了标准,所以这并不奇怪)
- Firefox 4 is on JavaScript 1.8.5
- Firefox 4在JavaScript 1.8.5上。
- The other big off-the-beaten-path one is IE9 - it implements ECMAScript 5, but doesn't implement all the features of JavaScript 1.8.5 (not sure what they're calling this version of JScript, engine codenamed Chakra, yet).
- 另一个大的现成的方法是IE9——它实现了ECMAScript 5,但是没有实现JavaScript 1.8.5的所有特性(不确定他们调用这个版本的JScript,引擎代号的Chakra)。
#2
65
Click on this link to see which version your BROWSER is using: http://jsfiddle.net/Ac6CT/
单击此链接可查看浏览器使用的版本:http://jsfiddle.net/Ac6CT/。
You should be able filter by using script tags to each JS version.
您应该能够通过使用每个JS版本的脚本标记来过滤。
<script type="text/javascript">
var jsver = 1.0;
</script>
<script language="Javascript1.1">
jsver = 1.1;
</script>
<script language="Javascript1.2">
jsver = 1.2;
</script>
<script language="Javascript1.3">
jsver = 1.3;
</script>
<script language="Javascript1.4">
jsver = 1.4;
</script>
<script language="Javascript1.5">
jsver = 1.5;
</script>
<script language="Javascript1.6">
jsver = 1.6;
</script>
<script language="Javascript1.7">
jsver = 1.7;
</script>
<script language="Javascript1.8">
jsver = 1.8;
</script>
<script language="Javascript1.9">
jsver = 1.9;
</script>
<script type="text/javascript">
alert(jsver);
</script>
My Chrome reports 1.7
我的Chrome 1.7报告
Blatantly stolen from: http://javascript.about.com/library/bljver.htm
公然窃取:http://javascript.about.com/library/bljver.htm
#3
13
In chrome you can find easily not only your JS version but also a flash version. All you need is to type chrome://version/
in a command line and you will get something like this:
在chrome中,你不仅可以找到你的JS版本,还可以找到flash版本。你只需要键入chrome://版本/在命令行,你就会得到这样的东西:
#4
4
Rather than finding which version you are using you can rephrase your question to "which version of ECMA script does my browser's JavaScript/JSscript engine conform to".
而不是找到您正在使用的版本,您可以将您的问题改为“我的浏览器的JavaScript/JSscript引擎符合哪个版本的ECMA脚本”。
For IE :
即:
alert(@_jscript_version); //IE
Refer Squeegy's answer for non-IE versions :)
请参阅Squeegy对非ie版本的回答:)
#5
2
All of todays browsers use at least version 1.5
:
http://en.wikipedia.org/wiki/ECMAScript#Dialect
现在所有的浏览器都使用至少1.5版:http://en.wikipedia.org/wiki/ECMAScript#方言。
Concerning your tutorial site, the information there seems to be extremely outdated, I beg you to head over to MDC and read their Guide:
https://developer.mozilla.org/en/JavaScript/Guide
关于您的教程站点,那里的信息似乎已经非常过时了,我请求您前往MDC并阅读他们的指南:https://developer.mozilla.org/en/JavaScript/Guide。
You may still want to watch out for features which require version 1.6
or above, as this might give Internet Explorer some troubles.
您可能仍然想要注意需要1.6版或以上版本的特性,因为这可能会给Internet Explorer带来一些麻烦。
#6
1
JavaScript 1.2 was introduced with Netscape Navigator 4 in 1997. That version number only ever had significance for Netscape browsers. For example, Microsoft's implementation (as used in Internet Explorer) is called JScript, and has its own version numbering which bears no relation to Netscape's numbering.
JavaScript 1.2在1997年引入Netscape Navigator 4。这个版本号对Netscape浏览器来说是有意义的。例如,微软的实现(在Internet Explorer中使用)称为JScript,并且有自己的版本号,与Netscape的编号没有关系。
#1
35
Wikipedia (or rather, the community on Wikipedia) keeps a pretty good up-to-date list here.
*(或者更确切地说,*上的社区)在这里保存了一个很好的最新列表。
- Most browsers are on 1.5 (though they have features of later versions)
- 大多数浏览器都是1.5版(尽管它们有后来版本的特性)
- Mozilla progresses with every dot release (they maintain the standard so that's not surprising)
- Mozilla的每一个版本都有进展(他们保持了标准,所以这并不奇怪)
- Firefox 4 is on JavaScript 1.8.5
- Firefox 4在JavaScript 1.8.5上。
- The other big off-the-beaten-path one is IE9 - it implements ECMAScript 5, but doesn't implement all the features of JavaScript 1.8.5 (not sure what they're calling this version of JScript, engine codenamed Chakra, yet).
- 另一个大的现成的方法是IE9——它实现了ECMAScript 5,但是没有实现JavaScript 1.8.5的所有特性(不确定他们调用这个版本的JScript,引擎代号的Chakra)。
#2
65
Click on this link to see which version your BROWSER is using: http://jsfiddle.net/Ac6CT/
单击此链接可查看浏览器使用的版本:http://jsfiddle.net/Ac6CT/。
You should be able filter by using script tags to each JS version.
您应该能够通过使用每个JS版本的脚本标记来过滤。
<script type="text/javascript">
var jsver = 1.0;
</script>
<script language="Javascript1.1">
jsver = 1.1;
</script>
<script language="Javascript1.2">
jsver = 1.2;
</script>
<script language="Javascript1.3">
jsver = 1.3;
</script>
<script language="Javascript1.4">
jsver = 1.4;
</script>
<script language="Javascript1.5">
jsver = 1.5;
</script>
<script language="Javascript1.6">
jsver = 1.6;
</script>
<script language="Javascript1.7">
jsver = 1.7;
</script>
<script language="Javascript1.8">
jsver = 1.8;
</script>
<script language="Javascript1.9">
jsver = 1.9;
</script>
<script type="text/javascript">
alert(jsver);
</script>
My Chrome reports 1.7
我的Chrome 1.7报告
Blatantly stolen from: http://javascript.about.com/library/bljver.htm
公然窃取:http://javascript.about.com/library/bljver.htm
#3
13
In chrome you can find easily not only your JS version but also a flash version. All you need is to type chrome://version/
in a command line and you will get something like this:
在chrome中,你不仅可以找到你的JS版本,还可以找到flash版本。你只需要键入chrome://版本/在命令行,你就会得到这样的东西:
#4
4
Rather than finding which version you are using you can rephrase your question to "which version of ECMA script does my browser's JavaScript/JSscript engine conform to".
而不是找到您正在使用的版本,您可以将您的问题改为“我的浏览器的JavaScript/JSscript引擎符合哪个版本的ECMA脚本”。
For IE :
即:
alert(@_jscript_version); //IE
Refer Squeegy's answer for non-IE versions :)
请参阅Squeegy对非ie版本的回答:)
#5
2
All of todays browsers use at least version 1.5
:
http://en.wikipedia.org/wiki/ECMAScript#Dialect
现在所有的浏览器都使用至少1.5版:http://en.wikipedia.org/wiki/ECMAScript#方言。
Concerning your tutorial site, the information there seems to be extremely outdated, I beg you to head over to MDC and read their Guide:
https://developer.mozilla.org/en/JavaScript/Guide
关于您的教程站点,那里的信息似乎已经非常过时了,我请求您前往MDC并阅读他们的指南:https://developer.mozilla.org/en/JavaScript/Guide。
You may still want to watch out for features which require version 1.6
or above, as this might give Internet Explorer some troubles.
您可能仍然想要注意需要1.6版或以上版本的特性,因为这可能会给Internet Explorer带来一些麻烦。
#6
1
JavaScript 1.2 was introduced with Netscape Navigator 4 in 1997. That version number only ever had significance for Netscape browsers. For example, Microsoft's implementation (as used in Internet Explorer) is called JScript, and has its own version numbering which bears no relation to Netscape's numbering.
JavaScript 1.2在1997年引入Netscape Navigator 4。这个版本号对Netscape浏览器来说是有意义的。例如,微软的实现(在Internet Explorer中使用)称为JScript,并且有自己的版本号,与Netscape的编号没有关系。