Today's Question:  What does your personal desk look like?        GIVE A SHOUT

 ALL


  Understand this in JavaScript

In JavaScript, this is always pointing to the owner of a function or a method.FunctionLet's check out function first.function introduce() {     alert("Hello, I am Laruence\r\n");}For this function, what does this point to? In JavaScript, a global function's owner is the current page, i.e, the window object. Because its a method of the window object if we define a global function. Now you should know the this will point to the window object in the above function.If we check the introduce property of window:var name = "I am Laruence";function introduce() {  &nb...

3,449 0       JAVASCRIPT THIS EVENT CALL