11.3 write something right

  Because he himself was recently preparing for interviews, I plan to write something about the interview, are also considered to enhance memory;

1.meta defined labels

  meta tag is a head part of the auxiliary labels, provide metadata about HTML documents, he will not be displayed on the page, but machine-readable and can be used browsers (how to display content or reload page), SEO or other web services.

  effect

  seo optimization, custom page language automatically refresh and point to the new page, the page conversion to achieve dynamic effects, control the page buffer, page grading evaluation, control window page is shown.

2.ajax process

  (1) create a XHR object, the object is to create an asynchronous call.

  (2) create a new http request and specifying the requested method, url and verify information

  (3) set the response function of the state change request http

  (4) sends an http request

  (5) acquires data returned

  (6) Use dom and js achieve partial refresh

3. What is closure

  In fact, with respect to the closure of some of the more difficult to understand, but basically it can be interpreted as creating a closed lexical scope in another scope.

  Closures Another application is to create private variables and methods.

  No clear way in JS to create private methods, but the closures can have private methods.

4.this keyword

  this generally represents the current location object.

  This keyword js is determined by the caller of the function, who is calling on this point which, if you can not find the caller, this will point to the windows object.

5.js how to handle synchronous and asynchronous

  js only a call stack is a single-threaded programming language. But it can also use a mechanism called an event loop (event loop) to deal with some asynchronous function.

  Asynchronous function does not immediately enter the call stack, but pushed into the task queue, and the call stack to be empty after.

  The event transmission from the task queue to the call stack called event loop.

Guess you like

Origin www.cnblogs.com/san-sui/p/11786133.html