Some recent record of the front face questions encountered

HTML parts:
1. Q: What DOCTYPE Yes.
A: Check the detailed explanation w3school HTTP: //www.w3school.com.cn/ta ... : DTD, SGML)

2. Q: What are inline elements, which block-level elements. margin property is somewhat effect on inline elements.
A: block elements commonly used are: <div> <p> < h1> <ul> and the like; inline elements: <a> <i> <span> <input> <select> <button> and the like. The left and right element rows margin is available, the entire line will move up and down margin.

3. Q: The new type of HTML5 in INPUT.
A: color, date, email, number , range, search, tel, url.

4. Q: disabled and readonly of difference.
A: readonly only for input (text / password) and textarea effective, and valid for all disabled form elements, including select, radio, checkbox, button and so on. Form elements after using the disabled, when we submit a form with POST or GET way, then the value of this element will not be passed out, and readonly The value is passed out. Detailed explanation: HTTP: //www.nowamagic.net/html ...


CSS components:
1. Q: What are CSS pseudo-classes, pseudo-elements.
A: pseudo-class (:) -> link, visited, hover, active ( in this order), first-child, nth- child (x), lang;
pseudo-elements (: :) -> first-letter , first-line , after, before.

2. Q: How to explain the depth of the box model.


JS components:
1. Q: JavaScript what type of data.
A: JavaScript is divided into two variables, the original value and the reference value. Refers to the original value is a value of the original data type, such as the value of undefined, null, number, string, boolean type represented. Reference value refers to the value of the complex data type, i.e. Object, Function, Array like. In this description link https: //segmentfault.com/a/11 ...

2. Q: JS of the event flow model related.
Answer: "DOM event flow": three stages: event capture, target stage, event bubbling.
"Event bubbling": Event began to accept the most specific elements, and then progressively spread upward
"event capture": an event is received by the least specific node first, then progressively down until the most specific


jQuery parts:
1. Q: jQuery event binding way bind, live, delegate, on.
Answer: .bind () the cost is very large, it will the same event handler to hook on all matching DOM element; do not reuse .live (), and it is no longer recommended, and there are many problems; .delegate () will provide a good way to improve efficiency, we can add an event handler method to add a dynamic element; we can use .on () instead of the three methods. Detailed explanation see http: //blog.csdn.net/panfang / ...

2. Q: how to terminate ajax request.
A: abort method XMLHttpRequest object.


JS algorithm problem Summary:

var a;
alert(typeof a); 
alert(b); 
var undefined;
undefined == null; 
1 == true;   
2 == true;   
0 == false;  
0 == '';     
NaN == NaN;  
[] == false; 
[] == ![];  
var foo = "11"+2-"1";
console.log(foo);
console.log(typeof foo);
var a = new Object();
a.value = 1;
b = a;
b.value = 2;
alert(a.value);

var foo = 1;
function(){
    console.log(foo);
    var foo = 2;
    console.log(foo);
}
for(var i=1;i<=3;i++){
  setTimeout(function(){
      console.log(i);    
  },0);  
};

This article is reproduced in: ape 2048➮ https://www.mk2048.com/blog/blog.php?id=hh112hhaahj

Guess you like

Origin www.cnblogs.com/jlfw/p/12582879.html