Go JavaScript One: Why learn JavaScript?

Source: Internet
Author: User

The Web program, whether b/s (browser/server) or C/s (client/server) architecture, is divided into two types: client program and server side program. Asp. NET is a powerful tool for developing server-side programs, but sometimes to reduce server burden and traffic, this requires writing programs that can be executed on the client side. Scripting languages are tools for developing client-side execution programs, and combining scripting languages with ASP is more efficient. There are many kinds of scripting languages, such as Python,vbscript,javascript,actionscript and so on. In view of the generality of JavaScript scripting language, we can make great use of existing resources for larger development when we do web front-end development.

In a sense, JavaScript is not a compiled language, but a supplemental language, with HTML and other markup-based language mainly for Web-related programming. JavaScript is a literal-translation scripting language, which is 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 the client, and is used in HTML (an application under the standard Universal Markup Language) to add dynamic functionality to an HTML Web page.

       javascript scripting language has the following characteristics:
        (1) scripting language. JavaScript is an interpreted scripting language, and C, C + +, and other languages are compiled and executed, and JavaScript is interpreted on a row-by-line basis in the course of a program's operation.
        (2) object-based. JavaScript is an object-based scripting language that allows you to create objects and use existing objects.
        (3) simple. The JavaScript language uses weakly typed variable types, which are not strictly required for the data types used, and are based on the Java Basic statement and Control scripting language, and its design is simple and compact.
        (4) dynamic. JavaScript is an event-driven scripting language that does not require a Web server to respond to user input. When you visit a webpage, the mouse clicks or moves up and down the page, and the window moves, and so on, JavaScript can respond directly to these events.
        (5) cross-platform. The JavaScript scripting language is not dependent on the operating system and requires only browser support. So a JavaScript script can be used on any machine after it is written, provided the browser on the machine supports the JavaScript scripting language, and JavaScript is now supported by most browsers.

JavaScript is a network scripting language, has been widely used in Web application development, often used to add a variety of dynamic features for Web pages, to provide users with more smooth and beautiful browsing effect. JavaScript scripts are typically embedded in HTML to implement their own functionality.
The main functions are:
1 is an explanatory scripting language (the code is not precompiled).
2 is primarily used to add interactive behavior to HTML (an application under the standard Universal Markup Language) page.
3 can be directly embedded HTML pages, but written as a separate JS file is conducive to the separation of structure and behavior.
4 cross-platform features, supported by most browsers, can be run on multiple platforms (e.g. Windows, Linux, Mac, Android, iOS, etc.).
The JavaScript scripting language, like other languages, has its own basic data types, expressions and arithmetic operators, and the Basic program framework of the program. JavaScript provides four basic data types and two special data types for working with data and text. The variable provides the place where the information is stored, the expression can complete the more complex processing.
The main uses are:
1 Embed dynamic text in HTML pages.
2 response to browser events.
3 Read and write HTML elements.
4 Validate data before the data is submitted to the server.
5 Detect visitor's browser information.
6 control of cookies, including creation and modification.
7 server-side programming based on node. JS Technology.

Unlike server-side scripting languages, such as PHP and Asp,javascript are primarily run as client scripting languages on the user's browser and do not require server support. So in the early days programmers preferred JavaScript to reduce the burden on the server, while at the same time brought another problem: security.

And as the servers are strong, programmers prefer to run scripts on the server to keep them safe, but JavaScript still has the advantage of being cross-platform and easy to use. At the same time, some special features (such as Ajax) must rely on JavaScript to support the client. With the development of engines such as V8 and frameworks such as node. JS, and its event-driven and asynchronous IO features, JavaScript is gradually being used to write server-side programs.

An overview of the JavaScript language is basically over, and as a scripting language for a Web page, it needs to be developed in conjunction with ASP. Cooperate with HTML markup Language for website development and Web page design. This requires a lot of examples to strengthen learning, more need to practice.

Go JavaScript One: Why learn JavaScript?

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.