0

有没有办法检测这个引擎有哪个版本的javascript?在控制台和浏览器上

例如我想知道的一致性

/usr/bin/js
/usr/bin/node
/usr/bin/ringo
/usr/bin/rhino
/usr/bin/seed
/usr/bin/gjs 
and browsers i currently using, etc 

他们是否兼容 Javascript 1.8.5,或者他们拥有哪个版本的 javascript

4

2 回答 2

1

检查以下类似情况。希望这会有所帮助

jQuery版本兼容性检测

谢谢 AB

于 2013-07-03T05:36:05.277 回答
1

尝试以下脚本以了解 Javascript 版本

<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>

检查这个 jsFiddle http://jsfiddle.net/Ac6CT/

谢谢

AB

于 2013-07-03T06:00:41.020 回答