Introduction to JavaScript language __javascript

Source: Internet
Author: User
some understanding of JavaScript language

First, the concept

JavaScript is a literal translation script language, a dynamic type, a weak type, a prototype based language, and a built-in support type. Its interpreter, known as the JavaScript engine, is widely used as a scripting language for clients, and is used in HTML (an application under standard Universal Markup Language) to add dynamic functionality to HTML Web pages.

Explain:

1, Dynamic language

Dynamic language, refers to the program in the runtime can change its structure: New functions can be introduced, the existing functions can be deleted, such as structural changes. JavaScript is a dynamic language. In addition, such as Ruby, Python are also belong to the dynamic language, and C, C + + and other languages are not dynamic language. For example, in JavaScript, you can dynamically add properties and methods to an object after it has been defined

See diagram example:

2, scripting language

A scripting language is a computer programming language created to shorten the traditional write-compile-link-run (edit-compile-link-run) process, interpreted or compiled only when invoked, and then executed. Its name originates from a script "screenplay", which repeats the dialog verbatim every time it runs. Early scripting languages are often referred to as batch processing languages or work-control languages.

3, weak type

A weak/strong type refers to the strict degree of type checking of a language type system, weakly typed languages do not need to determine the variable type when declaring variables, the language runtime implicitly does data type conversion, and for weakly typed languages, different types of variables can be used for direct operations, while those with strong types may not.


Second, JavaScript and ECMAScript

1,ECMA and ECMAScript

ECMA is the abbreviation of European Computer Manufacturers Association, the European Computer Manufacturers Association. The European Association of Computer manufacturers is an international standard organization for the development of information transmission and communication.

ECMAScript is a standardized scripting language developed by ECMA, and the ECMAScript version currently used by JavaScript is ecmascript-262;ecmascript adopted by the International Standards Organization as ISO/IEC 16262.

2, the relationship between the two

The relationship between ECMAScript (standard) and JavaScript (concrete implementation) is that the former is the latter specification, and the latter is an implementation of the former (another ECMAScript dialect with JScript and ActionScript)

JavaScript not only implements the ECMAScript standard, but also adds Dom and BOM models to the browser environment, as shown in the following figure



Iii. JavaScript Pseudo-protocol

When using JavaScript in a browser, you can either embed <script> tag or use javascript: this pseudo protocol, other pseudo protocols and Mail:tel:file:

For example, the use of <a href= "Javascript:alert" (' Test '); >test</a>


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.