检测JavaScript的版本 [英] Detect version of JavaScript

查看:109
本文介绍了检测JavaScript的版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何检测浏览器支持的JavaScript版本(如果有)?我想检查ECMAScript 3与ECMAScript 5对比ECMAScript 6。

How can I detect what version of JavaScript the browser supports (if any)? I want to check for ECMAScript 3 versus ECMAScript 5 versus ECMAScript 6.

注意:我想避免使用已弃用的语言标签。

Note: I want to avoid the deprecated language tag.

推荐答案

我想这取决于你想对信息做些什么,但很多人更喜欢做特征检测而不是弄清楚某人正在使用什么浏览器或JS的版本。

I suppose it depends on what you want to do with the information, but many people prefer to do feature detection, instead of figuring out what browser someone is using or what version of JS.

查看 Modernizr ,这是一个很棒的库,可以进行功能检测您。

Check out Modernizr, which is a great library that does feature detection for you.

这篇关于检测JavaScript的版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆