本文介绍了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.

现在,根据回答您的问题,如果媒体类型设置为 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.

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

08-19 13:35
查看更多