Home >Web Front-end >JS Tutorial >Introduction to JavaScript version puzzles_javascript skills

Introduction to JavaScript version puzzles_javascript skills

WBOY
WBOYOriginal
2016-05-16 18:11:51891browse

It has been 16 years since JavaScript was born in 1995. Today, countless web pages around the world rely on it to complete various key tasks. JavaScript once ranked 8th in the programming language rankings released by Tiobe, following C# and JavaScript. From a decorative scripting language in the past to a mainstream programming language, people use it to develop larger and more complex programs. This requires web developers to have a deeper understanding of JavaScript and its past, present and future.

A brief history of JavaScript

Around 1992, a company called Nombas began to develop a tool called C-minus-minus (Cmm for short) ) embedded scripting language. This scripting language was bundled in a shareware product called CEnvi. When Netscape Navigator came to prominence, Nombas developed a version of CEnvi that could be embedded in web pages. These early experiments were called Espresso Pages, and they represented the first client-side scripting languages ​​used on the World Wide Web. Nombas had no idea that its concept would become an important cornerstone of the Internet.

As Internet surfing becomes more and more popular, the need for developing client-side scripts also gradually increases. Brendan Eich, who was working at Netscape at the time, began to develop a scripting language called LiveScript for Netscape Navigator 2.0, which was to be released in 1995. The purpose at that time was to use it on both the browser and the server side. Netscape teamed up with Sun to complete LiveScript implementation in a timely manner. Just before Netscape Navigator 2.0 was about to be officially released, Netscape changed its name to JavaScript in order to take advantage of the Internet buzzword Java. Netspace's bet eventually paid off, and JavaScript has since become an essential component of the Internet.

ECMAScript Standard

Because JavaScript 1.0 was so successful, Netscape released version 1.1 in Netscape Navigator 3.0. At that time, Microsoft decided to get into browsers and released IE 3.0 with a clone of JavaScript called JScript (named this way to avoid potential licensing disputes with Netscape). Although Microsoft's important step into the field of web browsers made it infamous, it also became an important step in the development of the JavaScript language.

After Microsoft entered, three different JavaScript versions existed at the same time: JavaScript in Netscape Navigator 3.0, JScript in IE, and ScriptEase in CEnvi. Unlike C and other programming languages, JavaScript does not have a standard to unify its syntax or features, and these three different versions highlight this problem. As the industry's concerns increase, this language standardization is obviously imperative. In 1997, JavaScript 1.1 was submitted as a draft to the European Computer Manufacturers Association (ECMA), and TC39, composed of programmers from Netscape, Sun, Microsoft, Borland, and other companies interested in scripting, hammered out ECMA-262 , this standard defines a new scripting language called ECMAScript. Since then, web browsers have worked hard (albeit with varying degrees of success and failure) to use ECMAScript as the basis for JavaScript implementation.

Although ECMAScript is an important standard, it is not the only part of JavaScript, and certainly not the only part that is standardized. In fact, a complete JavaScript implementation is composed of the following 3 different parts
• Core (ECMAScript) - The core of JavaScript ECMAScript describes the syntax and basic objects of the language
• Document Object Model (DOM) ——DOM describes the methods and interfaces for processing web content
 •Browser Object Model (BOM)——BOM describes the methods and interfaces for interacting with the browser

JavaScript version history

Due to historical reasons and the continuous development of technology, there are many versions of JavaScript, and the implementation of various browsers is also different. The author has sorted out the various versions of JavaScript and the corresponding browsers based on various aspects of information. Implementation, this is also the main purpose of this article. Everyone is welcome to provide opinions and improve it together.

版本 发布日期 基于 Netscape Navigator Mozilla Firefox Internet Explorer Opera Safari Chrome
1.0 1996年3月
2.0
3.0 (JScript 1.0)(1996年8月)


1.1 1996年8月
3.0
3.0 (JScript 2.0)(1997年1月)



1.2 1997年6月
4.0-4.05




1.3 1998年10月 ECMA-262 第一版 (1997年6月发布)/ ECMA-262 第二版 (1998年6月发布) 4.06-4.7x
4.0 (JScript 3.0)(1997年10月)


1.4

Netscape Server Only

JScript 4.0 (Visual Studio 6, no IE release)

5.0 (JScript 5.0)(1999年3月)




1.5 2000年11月 ECMA-262 第三版 (1999年12月发布) 6.0 1.0

5.5 (JScript 5.5)(2000年7月)

6 (JScript 5.6)(2001年10月)

7 (JScript 5.7)(2006年10月)

8 (JScript 5.8)(2009年3月)



1.6 2005年11月 1.5 + Array extras + Array and String generics + E4X
1.5

3.0, 3.1
1.7 2006年10月 1.6 + Pythonic generators + Iterators + let
2.0

3.2, 4.0 1.0
1.8 2008年6月 1.7 + Generator expressions + Expression closures
3.0



1.8.1 2009年6月
1.8 + Native JSON support + Minor Updates
3.5



1.8.5 2010年7月
1.8.1 + ECMAScript 5 Compliance
4 9



2.0 制定中
ECMAScript Harmony
 



Special Notes:
1. When Netscape released its source code to the public as a Mozilla project, it was originally planned that JavaScript 1.4 would be embedded in Netscape Navigator 5.0. However, an aggressive decision to redesign Netscape's code entirely from scratch derailed this effort. JavaScript 1.4 was released only as a server-side scripting language for Netscape Enterprise Server and was not put into the browser in the future.
 2.E4X (ECMAScript for XML) is a programming language extension that adds dynamic XML support based on the ECMAScript (see ECMA-262, including ActionScript, JavaScript and other language implementations) standard. E4X is intended as an alternative to the DOM interface. It allows programmers to access XML documents in ECMAScript scripts through a more concise syntax. At the same time, it also provides a new method for realizing XML visualization in scripts.
3. Since the release of IE 5.5, Microsoft has not updated its browser-based JavaScript implementation strategy, but JScript.NET is included in the .NET Framework as an implementation of ECMAScript 4, which adds some Microsoft-specific function, it cannot be used in IE as a client-side scripting language, but can only be used in ASP.NET as a server-side language or a stand-alone application. Unlike other versions of JavaScript, JSscript.NET is a compiled language and can be a stand-alone executable file.
 4.ECMAScript Harmony is actually a temporary new name for the fourth edition of ECMAScript including JavaScript 2.0 (maybe it will be the sixth edition of ECMAScript in the future?), while the fifth edition of ECMAScript is a later name for the independently developed ECMAScript 3.1 language. .
5. Today, all mainstream web browsers comply with the third edition of ECMA-262, which implements JavaScript version 1.5. JavaScript 1.6-1.9 is just the temporary code name for the upgrade of ECMAScript (JavaScript on Gecko) to JavaScript 2.0.
Check JavaScript version
Click the test button to test the JavaScript version supported by your current browser. When testing in IE8, it is prompted that the supported version is 1.3. Strange?







[Ctrl A select all Note:

If you need to introduce external Js, you need to refresh to execute ] Reference content: 1.JavaScript Advanced Programming2.http://en.wikipedia.org/wiki/Javascript#History 3.http://en.wikipedia.org/wiki/ECMAScript#Version_correspondence4 .http://ejohn.org/blog/versions-of-javascript/5.https://developer.mozilla.org/en/JavaScript/Guide/JavaScript_OverviewAuthor: DreamSource: http://www.cnblogs.com/lhb25
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn