1、In 1994, Netscape released navigator 0.9
It is the first mature web browser in history, but this version of browser can only be used for browsing, and does not have the ability to interact with visitors
2. Netscape had two options at the time:
Allow existing languages to be directly embedded in web pages (easy to promote, poor compatibility)
Invent a new language
3. In 1995, Sun company changed the name of oak language to Java, and officially launched it to the market, promising that this language can “write once, run anywhere”
4. Netscape, in alliance with sun, employs Brendan EICH, a 34 year old system programmer
His design idea is as follows:
(1) Learn from the basic grammar of C language;
(2) The data type and memory management of Java language are used for reference;
(3) Using scheme language for reference, the function is promoted to the status of “first class”;
(4) Use for referenceSelf languageUsing the inheritance mechanism based on prototype.
It is generally used to write client script to add interaction behavior for HTML pages. It is the foreground language, not the background language (except node. JS)
1、Explain and execute (browser is interpreter): do not compile in advance, execute line by line, without strict variable declaration.
2. Easy to use: you can use any text editing tool to write, just need a browser to execute the program.
3. Object based: built in a large number of ready-made objects, write a small number of programs to achieve the goal
2. Document object model (DOM): an API for manipulating elements on a web page. For example, let the box move, change color, rotate pictures, etc.
3. Browser object model (BOM) Broswer object model: an API for operating part of browser functions. For example, let the browser scroll automatically.
6、 The history of ECMAScript
|1997||ECMAScript 1||The first version|
|1998||ECMAScript 2||Version change|
Add regular expression
Add try / catch
|ECMAScript 4||Not published|
Add “strict mode” strict mode
Add JSON support
|2011||ECMAScript 5.1||Version change|
|2015||ECMAScript 6（ES6）||Add classes and modules|
Increase exponent operator (* *)
7、 JS is a weakly typed, dynamic language