Introduction to...LOGIN

Introduction to JavaScript

History of JavaScript

To understand JavaScript, we must first review the birth of JavaScript.

In 1995 of the last century, Netscape was becoming the most famous first-generation Internet company at the beginning of the Web era with its Navigator browser.

Because Netscape wanted to add some dynamic effects to static HTML pages, a guy named Brendan Eich designed the JavaScript language within two weeks. You read that right, this guy only took 10 days.

Why is it called JavaScript? The reason is that the Java language was very popular at the time, so Netscape hoped to use Java's fame to promote it. But in fact, except for the syntax of JavaScript, which is a bit like Java, other parts basically have nothing to do with it.

ECMAScript

Because Netscape developed JavaScript, a year later Microsoft imitated JavaScript and developed JScript. In order to make JavaScript a global standard, several companies joined forces with ECMA (European Computer Manufacturers Association) to organize The standard that customizes the JavaScript language is called the ECMAScript standard.

So to put it simply, ECMAScript is a language standard, and JavaScript is Netscape's implementation of the ECMAScript standard.

Then why not just make JavaScript a standard? Because JavaScript is a registered trademark of Netscape.

But most of the time, we still use the word JavaScript. If you encounter the word ECMAScript, simply replace it with JavaScript.

JavaScript version

The JavaScript language was designed in 10 days. Although the level of language designers is very NB, no one can stand the "time is tight and the task is heavy", so JavaScript There are many design flaws, which we will talk about later.

In addition, since the JavaScript standard - ECMAScript is constantly developing, the latest version of the ECMAScript 6 standard (ES6 for short) has been officially released in June 2015. Therefore, when it comes to the JavaScript version, it actually means Which version of the ECMAScript standard does it implement.

Since the browser determines the JavaScript version when it is released, and many users are still using ancient browsers like IE6, this means that when you write JavaScript, you have to take care of old users. You cannot write using the latest ES6 standard right from the start, otherwise, old users’ browsers will not be able to run the new version of JavaScript code.

However, the core syntax of JavaScript has not changed much. Our tutorial will first talk about the core usage of JavaScript, and then explain the new features for ES6.

Next Section
<!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title> RunJS 演示代码 </title> <script> var ck = function(){ var x = prompt ("输入数据: ", ""); alert(x); } </script> </head> <body> <button onclick="ck();"> 输入按钮 </button> </body> </html>
submitReset Code
ChapterCourseware