-----------------------------------------------------------------cc=function() {alert (345)},pushstack=function() {cc ();},pushstack ();//345//No VAR is placed in the Window object Pushstack=function() {cc ();},CC=function() {alert (345)},pushstack ();//345----------------------------------------------------------------Pushstack=function() {cc ();//cc is not defined};p Ushstack (); CC=function() {alert (345)};p ushstack=function() {cc ();}; Pushstack ();//345functionCC () {alert (345)};----------------------------------------------------------------cc=function() {alert (345)};p ushstack ();//Pushstack is not defined, when the JS parser executes here Pushstack or undefinedPushstack =function() {cc ();}; CC=function() {alert (345)};p ushstack ();//when the 345,JS parser executes here, Pushstack has defined thefunctionPushstack () {cc ();};
name = ' 2 '; a=function() {alert ( This. Name); Alert (888);},o={fn1:function() {a=function(){ //fn1 Execution of the time (fn1 to execute, not execution is not added) to add a to the window, the external a method to cover theAlert This. name);//2 windowAlert This);//2Alert (666); }; A ();//666 a.call (window)WINDOW.A ();//666}}o.fn1 (); window.a ();//2 666
name = ' 2 '; a=function() {alert ( This. Name); Alert (888);},o={fn1:function(){ This. A =function(){//FN1 executes, adds a method to the O objectAlert This. Name); Alert ( This); Alert (666); }; A (); //2 888 a.call (window), all from the window to find a () No errorWINDOW.A ();//2 888}}o.fn1 (); window.a ();//2 888
O.A ();//666
name = ' 2 '; a=function() {alert ( This. Name); Alert (888);},o={fn1:function(){ varA =function() {//fn1 function executes, there are 2 a methods, one in the FN1 local scope, one at window alert ( This. Name); Alert ( This); Alert (666); }; A (); //2 666 a.call (window), finding a method of local scopeWINDOW.A ();//2 888}}o.fn1 (); window.a ();//2 888
jquery js analytic function, function call directly