JavaScript Learning Chapter--The initial Javascript__java

Source: Internet
Author: User
Tags hosting

what JavaScript is.

JavaScript is a prototype, inherited, object-oriented, dynamically typed, case-sensitive client-side scripting language, designed to address the server language and provide customers with a smoother browsing effect


JavaScript is a new programming language that is adapted to the needs of dynamic web-making, and is now increasingly used in Internet web page production. It is a client Web development scripting language, commonly used to add dynamic functionality to HTML pages, on the basis of HTML, using JavaScript can develop interactive Web pages, such as responding to the user's various operations, JavaScript appearance allows the Web page and users to achieve a real-time, Dynamic, interactive relationships, so that the Web page contains more active elements and more exciting content.

the composition of JavaScript.

A complete JavaScript implementation is comprised of the following 3 different parts: the core (ECMAScript), the Document Object model (the text, the DOM), the browser object model (Browserobject models, For short, BOM).


As shown in figure:


Below we will these three components, simple to say.

ECMAScript

ECMAScript simple to understand is a standard, it sets a number of rules, as we learn English grammar rules, it is so stipulated, but ECMAScript this standard is constantly updated.


Let's take a little look at the ECMAScript standard, "ECMAScript can provide core scripting capabilities for different kinds of hosting environments, so the core scripting language is defined separately from any particular hosting environment ..." Web browsers for ECMAScript is a hosting environment, but it is not the only hosting environment. In fact, there are countless other environments (such as Nombas's scriptease, and Macromedia used in both Flash and Director MX) to accommodate the ECMAScript implementation. In addition to the browser also provides a number of content, including syntax, types, statements, keywords, reserved words, operators, objects. ECMAScript is a standard that defines all the properties, methods, and objects of a scripting language.


DOM

The DOM (Document Object model) is an application interface (API) for HTML and XML. The DOM will plan the entire page as a document composed of node hierarchies. The knowledge of the relational Dom will then be introduced in a special article.

BOM

The BOM, also known as the browser object model, can access and manipulate the browser window. With a BOM, developers can move windows, change text in the status bar, and perform other actions that are not directly related to the content of the page. The BOM is just one part of JavaScript, without any relevant criteria.

The BOM mainly handles browser windows and frames, but usually browser-specific JavaScript extensions are considered part of the BOM. These extensions include: pop-up new browser windows, moving, closing browser windows, resizing windows, locating objects that provide Web browser details, screen objects providing detailed information about user screen resolution, support for cookies, IE expanded BOM, adding ActiveXObject class , you can instantiate an ActiveX object through JavaScript.

Due to the absence of relevant BOM standards, each browser has its own BOM implementation. There are some de facto standards, such as having a Window object and a navigation object, but each browser can define its own properties and methods for those objects or other objects.

what features JavaScript has.

Scripting Languages

JavaScript is a scripting language, it takes the small program section of the method to achieve programming, it is an interpretive language, not a compiler language, it provides a simple development process, in the process of running the program is a row-by-line interpretation, and HTML, so as to facilitate the user to use the operation.

Object-based language

JavaScript is an object-based language and can also be viewed as an object-oriented language, which means it can use objects that it has created. As a result, many features can be derived from the interaction of the methods and scripts of objects in the scripting environment.

of Simplicity

The simplicity of JavaScript is mainly manifested in: first, it is a simple and compact design based on Java basic statements and control streams, which is a great way to learn java. Second, its variable type is weakly typed and uses strict data types.

Security

JavaScript is a security language, it does not allow access to the local hard disk, and can not save data to the server, do not allow the network files to modify and delete, only through the browser to achieve information browsing dynamic interaction, thus effectively prevent the loss of data.

of Dynamic

JavaScript is dynamic, and it can respond directly to the user's input to the customer's goods. Without having to go through a Web service program, it responds to the user in an event-driven manner, called event-driven, which refers to the action that is produced by performing an action on the home page, which is called an event, for example, by pressing the mouse , moving windows, selecting menus, and so on, can be treated as events, and events may cause corresponding event responses after they occur.

Cross-platform Nature

JavaScript is dependent on the browser itself, regardless of the operating environment, as long as the browser can run the computer, and support JavaScript browser can be correctly executed.

of interactivity

JavaScript makes Web pages more interactive. JavaScript simplifies regular, repetitive HTML paragraphs and reduces download time. JavaScript can respond to the user's actions in a timely manner, do a real-time check on the submission form without wasting time with CGI validation.

anyway

JavaScript is used as a scripting language for non programmers, not as a programming language for programmers, but JavaScript is a very rich language that has the same complexity, or complexity, as other programming languages. So we need to have a solid understanding of JavaScript to use it to write more complex programs.

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.