Web Front End Learning-sixth lesson JavaScript

Source: Internet
Author: User

Q11: What is the execution environment and scope? Use the code description.

Executing environment-defined variables or other data that a function has access to, determines their behavior, and each execution environment has a variable object associated with it, and all variables and functions defined in the environment are stored in the object.

This function contains two objects, his own variable object, the Global environment variable object, which can be accessed inside the function by the variable color because it is found in this scope chain.

Extended scope chain:: catch block fortry-catch Statements

With statement

There are no block-level scopes:

q12: What is http http head? How to ajax http head?

HTTP(Hypertext Transfer Protocol) Hypertext Transfer Protocol. is the Application Layer Communication protocol between WWW browser and www server. http protocol based on TCP/IP protocol, he not only guarantee the correct transmission of hypertext documents, but also determine which part of the transmission document, and that part of the content first display and so on.

(http://blog.chinaunix.net/uid-10540984-id-3130355.html)

The Http protocol defines a number of ways to interact with the server, with four basic types:GET,PUT,POST, DELETE

the header information for HTTP includes the general header, the request header, the corresponding header, and the four parts of the entity head. Each header field consists of a domain name, a colon (:), and a domain value of three parts.

1. The generic header is a header that both the client and server can use to provide some useful common functionality between the client, the server, and other applications, such as the Date header.

2. The request header is unique to the request message, which provides some additional information to the server, such as what type of data the client wants to receive, such as the accept header.

3. The response header facilitates the client to provide information, such as what type of server the customer service is interacting with, such as the server header.

4. the body head refers to the head that is used to respond to the body part of the entity, for example, the entity head can be used to describe the data type of the entity body part, such as Content-type head.

Ajax to fill in the http header:$.ajax ({

Type: "GET",

URL: "Default.aspx",

Success:function (Result) {

alert (result);

}

});

Web Front End Learning-sixth lesson 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.