JS Basic notes-basic common sense

Source: Internet
Author: User

From this blog began to record about JS learning path, including some previous knowledge of the review and the summary of the newly-learned knowledge. Have seen friends feel wrong can point out, we discuss together, after all, I still small white. If I had been playing a stand-alone, I had to take it as a cloud note. All of my JS knowledge comes from two books: JavaScript and DOM programming art, JavaScript advanced programming. Of course I will also put forward their own opinions and views, some places if wrong, please kindly point out that the little woman thanked.

First, what is JS?

JavaScript was born in 1995 (and my Age). Today's JavaScript has become a full-fledged programming language after several advanced upgrades. Ability to handle complex computations and interactions, with closures. Anonymous functions, even meta-programming (seemingly high-level, code-generating or manipulating code).

Second, JavaScript implementation

A complete JavaScript implementation should consist of the following three different parts:

I. Core (ECMASCRIPT) almost no compatibility issues

II. Document Object Model (DOM) some compatibility issues

III. Browser object Model (BOM) is almost incompatible

(1) ECMAScript stipulates the following components of the language:

--Grammar

--Type

--statement

--Key words

--Reserved words

--Operator

--Object

ECMAScript is the language description of all aspects of the implementation of the standard provisions, providing core language functions. JavaScript implements the Ecmascipt,adobe ActionScript as well as the ECMAScript.

(2) Document Object Model (DOM)

The Document Object model is an application programming interface (API) for XML that is extended for HTML, providing methods and interfaces for accessing and manipulating Web page content. See follow-up notes for detailed explanations.

(3) Browser object Model (BOM)

The browser object model, which enables developers to use the BOM to control parts of the page that the browser displays, provides methods and interfaces for interacting with the browser Browser. Personally, it is the BOM that can manipulate the browser window. See follow-up notes for detailed explanations.

Third, find your location (JS in the location of the page)

In the section, the most common way is in the Head section of the page , and the browser parses the head section to execute the code.

In the <body> section,theJS code executes when the page reads to the statement.

Note: The JS for the page display initialization must be placed inside the head , because initialization requires advance, and if it is a function that is executed through an event call There is no requirement for location.

Referencing multiple JS code externally in

JS Basic notes-basic common sense

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.