JavaScript version puzzle Introduction _javascript Tips

Source: Internet
Author: User
JavaScript has been 16 years since its birth in 1995, and now countless web pages around the world rely on her to complete a variety of key tasks, JavaScript in the Tiobe published the list of programming languages in the 8th place, followed by C #, JavaScript has transformed from a previously decorative scripting language into a mainstream programming language that people use to develop larger and more complex programs, which requires web developers to learn more about JavaScript and understand its past, present, and future.

JavaScript History Overview

Probably in 1992, a company called Nombas began developing an embedded scripting language called C-minus (C-minus-minus), or CMM. This scripting language is bundled with a shared software product called Cenvi, and when Netscape Navigator emerges, Nombas developed a version of Cenvi that can be embedded in a Web page. These early experiments were called Espresso page (espresso-like pages), which represented the first client-side scripting language that was used on the World Wide Web. And Nombas never expected that its idea would become an important cornerstone of the Internet.

As web surfing becomes more and more popular, the need for developing client-side scripting is growing. Brendan Eich, who worked at Netscape, began to develop a scripting language called LiveScript for Netscape Navigator 2.0, which was to be released in 1995, when the goal was to use it both on the browser and on the server side. Netscape joined hands with Sun to complete the livescript implementation in time. Just before Netscape Navigator 2.0 was about to be released, Netscape renamed it JavaScript to take advantage of Java, the Internet buzzword. Netspace's bets eventually get rewarded, and JavaScript becomes 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 enter the browser, published IE 3.0 and carried a cloned version of JavaScript, called JScript (which is named to avoid potential licensing disputes with Netscape). This important step in the field of Web browsers, though notorious, has become an important step in the development of JavaScript language.

After Microsoft entered, there were 3 different versions of javascript: 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 3 different versions highlight the problem. As industry fears rise, the language standardization is clearly imperative. In 1997, JavaScript 1.1 was presented as a draft to the European Computer Manufacturers Association (ECMA), made up of TC39 from Netscape, Sun, Microsoft, Borland and other programmers interested in scripting programming ECMA-262 , the standard defines a new scripting language called ECMAScript. From then on, web browsers began to work (albeit with varying degrees of success and failure) to ECMAScript as a basis for JavaScript implementations.

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 consists of the following 3 different parts
The core of the core (ECMAScript)--javascript ECMAScript describes the syntax and basic objects of the language
• Document Object Model (DOM)--dom describes methods and interfaces for handling Web page content
• Browser object Model (BOM)--bom describes methods and interfaces for interacting with browsers

JavaScript Version history

Because of the historical reasons and the continuous development of technology, JavaScript version of many, the implementation of various browsers are not the same, the author based on various aspects of the information of the various versions of JavaScript and the corresponding browser implementation, this is the main purpose of this article, welcome to provide advice, Perfect together.
Version Release date Based on Netscape Navigator Mozilla Firefox Internet Explorer Opera Safari Chrome
1.0 March 1996
2.0
3.0 (JScript 1.0) (August 1996)


1.1 August 1996
3.0
3.0 (JScript 2.0) (January 1997)



1.2 June 1997
4.0-4.05




1.3 October 1998 ECMA-262 first edition (released in June 1997)/ECMA-262 second Edition (released in June 1998) 4.06-4.7x
4.0 (JScript 3.0) (October 1997)


1.4

Netscape Server only

JScript 4.0 (Visual Studio 6, no IE release)

5.0 (JScript 5.0) (March 1999)




1.5 November 2000 ECMA-262 Third Edition (released December 1999) 6.0 1.0

5.5 (JScript 5.5) (July 2000)

6 (JScript 5.6) (October 2001)

7 (JScript 5.7) (October 2006)

8 (JScript 5.8) (March 2009)



1.6 November 2005 1.5 + array Extras + array and String generics + e4x
1.5

3.0, 3.1
1.7 October 2006 1.6 + Pythonic Generators + iterators + Let
2.0

3.2, 4.0 1.0
1.8 June 2008 1.7 + Generator Expressions + Expression closures
3.0



1.8.1 June 2009
1.8 + Native JSON support + Minor Updates
3.5



1.8.5 July 2010
1.8.1 + ECMAScript 5 Compliance
4 9



2.0 In development
ECMAScript Harmony




Special Note:
1. When Netscape published its source code as a Mozilla project, it was planned that JavaScript 1.4 would be embedded in Netscape Navigator 5.0. However, a rash decision-to redesign Netscape's code completely from scratch-undermines the job. JavaScript 1.4 is only published as a server-side scripting language for a Netscape Enterprise server and has not been put into a browser in the future.
2.E4X (ECMAScript for XML) is a program language extension supported by dynamic XML that is added on the basis of the ECMAScript (see ECMA-262, including ActionScript, JavaScript, and other language implementations). The purpose of E4X is to act as an alternative to the DOM interface. It allows programmers to access XML documents in a ECMAScript script using more concise syntax. It also provides a new way to implement XML visualization in scripts.
3. Starting with the IE 5.5 release, Microsoft has not updated its browser-based JavaScript implementation strategy, but has included jscript.net as an implementation of ECMAScript 4 in the. NET Framework, adding some Microsoft-specific features, It cannot be used in IE as a client script language and can only be used in asp.net as a server-side language or standalone application. Unlike other versions of JavaScript, Jsscript.net is a compiled language and can be standalone executable files.
4.ECMAScript Harmony is actually a temporary new name for ECMAScript fourth edition containing JavaScript 2.0 (the future may be ECMAScript Sixth edition). , the fifth edition of ECMAScript is the late naming of the independently developed ECMAScript 3.1 language.
5. Today, all major Web browsers adhere to the ECMA-262 third edition, which is JavaScript version 1.5, JavaScript 1.6-1.9 is ECMAScript (JavaScript on Gecko) Upgrade to JavaScript 2.0 's temp code.
detecting JavaScript versions
Click the test button to test your current browser-supported JAVASCRPT version, test in IE8, prompted that the support version is 1.3, strange?
<! DOCTYPE HTML PUBLIC "-//w3c//dtd HTML 4.01 transitional//en" "Http://www.w3.org/TR/html4/loose.dtd" > <ptml> &L t;head> <title>determine JavaScript version</title> <style type= "text/css" > HTML, Body {margin:0 ; padding:0} </style> <script language= "JavaScript" > var jsversion = 1.0; </script> <script language= "javascript1.1" > jsversion = 1.1; </script> <script language= "javascript1.2" > jsversion = 1.2; </script> <script language= "javascript1.3" > jsversion = 1.3; </script> <script language= "javascript1.4" > jsversion = 1.4; </script> <script language= "javascript1.5" > jsversion = 1.5; </script> <script language= "javascript1.6" > jsversion = 1.6; </script> <script language= "javascript1.7" > jsversion = 1.7; </script> <script language= "javascript1.8" > jsversion = 1.8; </script> <script language= "javascript1.9 "> jsversion = 1.9; </script> <script language= "javascript2.0" > jsversion = 2.0; </script> </pead> <body> <div> <script language= "JavaScript" > document.write (' Your brow Ser claims to support JavaScript ' + jsversion ' </script> </div> </body> </ptml>
[Ctrl + A All SELECT Note: If the need to introduce external JS need to refresh to perform]

Reference content:

1.JavaScript Advanced Program Design
2.http://en.wikipedia.org/wiki/javascript#history 3.http://en.wikipedia.org/wiki/ecmascript#version_correspondence
4.http://ejohn.org/blog/versions-of-javascript/
5.https://developer.mozilla.org/en/javascript/guide/javascript_overview
Author: Dream
Source: Http://www.cnblogs.com/lhb25

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.