Test.html calls two js files a.js and b.js:
There is a
in the a.js filefunction test(){
console.log(1);
}
Now I want to add a
to the test function in b.jsconsole.log(2);
The goal is to output 1 and 2 no matter where test() is called, how to write it
巴扎黑2017-05-18 10:51:31
var rawTest = test;
test=function(){
rawTest();
console.log(2);
}
//
test();