Javascript和ECMA脚本有什么区别? [英] What is the difference between Javascript and ECMA script?

查看:162
本文介绍了Javascript和ECMA脚本有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我开始将脚本标记定义为ECMA会发生什么?它会执行不同的标准吗?

What would happen if I start to define my script tags as ECMA? Will it execute to a different standard?

有没有人真正使用ECMA脚本而不是直接Javascript ...?

Does anyone actually use ECMA script instead of straight up Javascript...?

推荐答案

ECMAScript是一种标准。 JavaScript是该标准的实现(更准确地说,该标准的第3版)。

ECMAScript is a standard. JavaScript is an implementation of that standard (edition 3 of that standard to be more exact).

ECMAScript的其他实现是ActionScript和JScript。

Other implementations of ECMAScript are ActionScript and JScript.

还要注意,没有一个的JavaScript 。只要符合ECMAScript要求,每个JavaScript引擎都可以实现自己的语言版本。这意味着浏览器(JS引擎)可能具有其他功能,但它们必须具有基本ECMAScript功能。

Also note that there isn't one JavaScript. Each JavaScript engine may implement its own version of the language as long as it meets the ECMAScript requirements. This means that browsers (JS engines) may have additional functionality, but they all must have the base ECMAScript functionality.

现在,根据 RFC 4329 回答您的问题,如果媒体类型设置为 application / ecmascript ,而不是 application / javascript ,它必须遵守更严格的标准。

And now, to answer your question, according to RFC 4329, if the media type is set to application/ecmascript, rather than application/javascript, it must adhere to a stricter standard.


本文档定义了
text / javascript,text / ecmascript和$ b $类型的等价
处理要求b应用程序/ javascript。对于媒体类型
application / ecmascript,使用和
支持相比本文档中定义的其他媒体
类型的广泛使用价格要低得多。使用
就此而言,这个文件

定义了更严格的处理规则,以促进更多可互操作的
处理。

This document defines equivalent processing requirements for the types text/javascript, text/ecmascript, and application/javascript. Use of and support for the media type application/ecmascript is considerably less widespread than for other media types defined in this document. Using that to its advantage, this document defines stricter processing rules for this type to foster more interoperable processing.

这篇关于Javascript和ECMA脚本有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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