1 The output value of the following code is:
Alert (1&&2) //2
Answer
1, as long as "| |" False before, regardless of "| |" Back is true or FALSE, return "| |" The value that follows.
2, as long as "| |" True before, regardless of "| |" Back is true or FALSE, return "| |" The previous value.
3, as long as "&&" before false, regardless of "&&" after is true or false, the result will return to the value before "&&".
4, as long as the "&&" front is true, regardless of "&&" after is true or false, the result will return to the value after "&&".
2. Regular expression matching, beginning with 11N, 12N or 1NNN, followed by-7-8 digits of the phone number
var reg =/^ (11n|12n|1nnn) [0-9]{7,8}$/;
var str = "11n1234567";
Console.log (Str.match (reg));
Note: The regular expression requires a write-start sign closing symbol
3 Write out the output value of the following code
var obj = {
a:1,
b:function () {Console.log (THIS.A)}}
;
var a = 2;
var objb = obj.b;
OBJ.B ();
OBJB ();
Obj.b.call (window);
Answer
1
2
2
A for 2,OBJB in window is an instance of window.
4 write out the color values of the following code in each browser?
background:red;
_background:green;
*background:blue;
background:black\9;
CSS Hack Classification
CSS Hack has roughly 3 representations, CSS attribute prefix method, selector prefix method and IE conditional annotation method (i.e. HTML header reference if IE) Hack, the actual project CSS Hack mostly is for the different versions of IE browser performance differences introduced.
Property prefix method (that is, class internal hack): For example, IE6 can recognize the underscore "" and the asterisk "*", IE7 can recognize the asterisk "*", but do not recognize the underscore "", Ie6~ie10 Know "\9", but Firefox said three can not know.
Selector prefix method (selector hack): For example, IE6 can recognize HTML. CLASS{},IE7 can identify +html. class{} or *:first-child+html. class{}.
IE conditional annotation method (i.e. HTML conditional annotation hack): For all IE (Note: ie10+ no longer supports conditional annotations):, for IE6 and the following versions:. This kind of hack not only takes effect on CSS, but all the code written in the judgment statement will take effect.
5 Output The following values:
var a = 1;
Function B () {
var a = 2;
Function C () {
console.log (a);
}
return c;
}
Answer:2
6 briefly describe the difference between mouseover and MouseEnter under IE.
Answer
When the mouse passes through the selected element or child element , it departs MouseOver, and only the mouseenter is triggered through the selected element . In IE, MouseEnter child elements do not repeatedly trigger events.