Sirloin JavaScript Summary (i)---basic knowledge

Source: Internet
Author: User

originally also heard JavaScript this thing, has been feeling very mysterious, but also did not go too much understanding. Now with the beef brisket brother had a preliminary study, but also some plain understanding, first summed up.

First, what is JavaScript?

JavaScript is a literal-translation scripting language , a dynamic type, a weak type, a prototype-based language, and a built-in support type. (Baidu Encyclopedia)

To explain briefly, the literal translation is that this programming language does not need to be compiled by the compiler to machine code, and then directly in the CPU can be executed;

Dynamic typing means that JavaScript type checking is done at runtime, and some officials say that the program can change its structure when it is running, such as the introduction of new functions and the deletion of existing functions;

A weak type , in contrast to a strong type, is not forced to require that the data type must be converted (such as (VAR) 1 plus (int) 3, the result is that 13,13 can be used as an integer continuation operation).

prototype-based (also called objects) is one of the features of JavaScript. Prototype-based language features: only objects, no classes, objects inherit objects, not classes. A prototype object is a template for a new object that shares its own properties with the new object .

JavaScript can be seen as an object-oriented language, meaning it can use objects that it creates. Therefore, many functions can be derived from the interaction of the methods of the objects in the scripting environment with the script.

In addition, as an explanatory language, it does not require pre-compilation before running, and the page load time is short. Its interpretation process is put in place when the program is running, so the execution is less efficient.

So, what does JavaScript do?

JavaScript is widely used in the client's scripting language, which was first used on HTML Web pages to add dynamic functionality to HTML pages, which is also an important embodiment and application of its "interactivity". It makes a real-time and dynamic interaction between the Web page and the user, which makes the webpage contain richer content.

In summary, it adds dynamic functionality to the HTML page and makes the page and the user more connected.

Besides, the video itself.

This video watched for three days, even knocking the example, relatively simple.

About data types, operators, control structures, some basic controls, the combination with CSS, and regular expressions.

The first three and CSS will not say, cliché. The regular expression will be summed up in the next blog post, where the main combination of events and methods to say I understand the JavaScript mechanism.

Look at one of the following small examples:

<script language= "javascript"  type= "Type/javascript" >function GetValue () {        var val= document.form1.wenben.value;//gets the value within the text box        alert (val);} </script><input type= "button" name= "button" id= "button" value= "Take Value" onclick= "Javascript:getvalue ();" >

In this JavaScript code, we can think of GetValue () as an interface, the concrete implementation and it is separate. That is, JS contains the framework and the specific content, and they can be separated (this word may not be very good).

It informs the results of the run through a popup box, providing an interactive window that enables developers and users to respond or modify well. This small, flexible design makes it easy to feel the dynamic type.


Summary: JavaScript here is only a little touch of fur, there are many in-depth technology needs to learn and understand, practice. It is very important to be able to get started quickly and to connect with previous knowledge. Therefore, when we learn a new language, it seems that we only need to learn the "different points", such as the JS language at this time, the characteristics of the emergence and application of the reasons (advantages and disadvantages) and some of the technology (video expression of the flexible use) can be.

        

Sirloin JavaScript Summary (i)---basic knowledge

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.