The history of Lan native Js:js and the advantages and disadvantages of JavaScript

Source: Internet
Author: User

The history of Lan native Js:js and the advantages and disadvantages of JavaScript

Lan 0 Basic Learning Html5-html+css Foundation

http://11824614.blog.51cto.com/11814614/1852769

JS Introduction

  The history of JS

In the 1995 of the last century, Netscape was the most famous first generation Internet company in the Web era with its navigator browser.

Because Netscape wanted to be able to add some dynamic effects to the static HTML page, it was called Brendan Eich, the man who designed the JavaScript language within two weeks. You're right, this guy only took 10 days.

Why is it called JavaScript? The reason is that the Java language is very prosperous, so Netscape wants to borrow Java's fame to promote, but in fact, JavaScript in addition to the syntax is a bit like Java, the rest of the part basically does not matter.

  JavaScript version compatibility

JavaScript language is designed in 10 days, although the language of the designer level is very NB, but who also jiabuzhu "time tight, task heavy", so, JavaScript has a lot of design flaws, we will slowly talk about later.

In addition, the latest version of the ECMAScript 6 standard (ES6) has been officially released in June 2015, as JavaScript's standard--ecmascript is evolving, so speaking of JavaScript versions, It actually means that it implements which version of the ECMAScript standard.

Since the browser at the time of release to determine the version of JavaScript, plus a lot of users are still using IE6 this ancient browser, which led you to write JavaScript, to take care of the old users, not to come up with the latest ES6 standard write, otherwise, The old user's browser is unable to run the new version of the JavaScript code.

  The composition of JS

ECMAScript

ECMAScript is a standard.

Since Netscape developed JavaScript, a year later, Microsoft emulated JavaScript to develop JScript, and in order for JavaScript to become a global standard, several companies joined the ECMA (European computer manufacturers Association) organizations have customized the JavaScript language standard, known as the ECMAScript standard.

So simply put, ECMAScript is a language standard, and JavaScript is a ECMAScript standard for Netscape.

So 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.

  Dom

Dom:document Object Model. Document Object model, behind which we will have a special course to explain DOM operations

 Bom

Bom:browser Object Model. Browser object model, behind which we will also specialize in BOM operations

Features of JavaScript

(1), a scripting language for explanatory execution.

Like other scripting languages, JavaScript is an explanatory language that provides a very convenient development process. JavaScript has a very similar syntactic structure to C, C + +, and Java. But before use, unlike these languages need to be compiled first, but in the process of running the program is interpreted row by line. JavaScript is combined with the HTML identity to make it easier for users to work with.

(2), an object-based scripting language.

It can also be seen as an object-oriented language, which means that JavaScript can use the objects it has created. Therefore, many functions can be derived from the interaction of the methods of the objects in the scripting environment with the script.

(3), a simple weakly typed scripting language.

Its simplicity is mainly reflected in: First, JavaScript is a simple and compact design based on Java basic statements and control flow, which makes it a good transition for users to learn Java or other C language programming languages, and for programmers with C language programming skills, JavaScript is also easy to get started with, and second, its variable type is weakly typed and does not use strict data types.

(4), a relatively safe scripting language.

JavaScript, as a security language, is not allowed to access local hard disks, and cannot store data on the server, modify and delete network documents, and only browse or dynamically interact with the browser. So as to effectively prevent the loss of data or illegal access to the system.

(5), an event-driven scripting language.

JavaScript responds to the user in an event-driven manner. An action that occurs in a Web page (Web page) that performs an action, called an event. For example, pressing the mouse, moving a window, selecting a menu, and so on can be considered an event. When an event occurs, it is possible to cause the corresponding event response to execute some corresponding script, which is called "event-driven".

(6), a cross-platform scripting language.

JavaScript relies on the browser itself, regardless of the operating environment, as long as the computer can run the browser, and support JavaScript browser, it can be executed correctly, thus realizing the "write once, go around the world" dream.

As a result, JavaScript is a new description language that can be embedded in HTML files. The JavaScript language can respond to consumer demand events (such as form input) without the need for any network to transmit data back and forth. So when a user enters a data, this data is not passed through to the server (server) processing and then back to the process, and directly can be processed by the client application.

The pros and cons of JavaScript

(1), The advantages of javascript:

<1>. JavaScript reduces network transmission.

Before the advent of user-side scripting languages such as JavaScript, traditional data submission and validation work was carried out over the network to the server by the client browser. If the amount of data is large, this is an intangible waste to the resources of the network and the server. With JavaScript, data validation can be done on the client.

<2>. JavaScript makes it easy to manipulate HTML objects.

JavaScript makes it easy to manipulate objects on various pages, and users can use JavaScript to control the appearance, state, and even operation of individual elements in the page, and JavaScript can "customize" the browser to the user's needs, making the page more friendly.

<3>. JavaScript supports distributed operations.

JavaScript enables multiple tasks to be done on the client side, without the need for network and server involvement, to support distributed operations and processing.

(2), JavaScript limitations:

<1> browser vendors have different levels of JavaScript support.

There are many browsers on the internet, such as Firefox, Internet Explorer, opera, and so on, but the degree to which each browser supports JavaScript is different, and when browsers browse a home page with JavaScript scripts, Because of the slightly different support for JavaScript, the effect will be a certain gap, and sometimes can not even show.

<2>. " Web Security "Some of the functionality of JavaScript is sacrificed.

When you set a design goal for JavaScript to "web security," you need to sacrifice some JavaScript functionality. As a result, pure JavaScript will not be able to open, read, and save files on the user's computer. The only information that it has access to is the information in the Web home page that the JavaScript embeds, in short, JavaScript will only exist in its own little World-web home page.

The history of Lan native Js:js and the advantages and disadvantages of JavaScript

Related Article

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.