Home > front end >  How to set the trigger condition of js method to another method of js calls
How to set the trigger condition of js method to another method of js calls

Time:04-23

 
//the source code
.
Function a () {
console.log("111");
}
.
a();
.
//new code
The function () {b
The console. The log (" 222 ");
}

Beginner js food chicken consult
Demand is probably:
Source code is modified
Want a performed immediately b, then continue to execute

Extension step, if can do it before you is to call, be in namely executed before the b


Probably is the analogy of the jQuery event, see a call as an event, b with this event, each incident triggered

By the way, can be directly modified in the b a runtime code?
  • Related