以下是类的代码:
var Functions = {
oFunctions: null,
add: function (oFunc, oNewFunc) {
var oNew = function () {
oFunc();
oNewFunc();
};
return oNew;
}
};
以下是测试代码:
function one() {
alert(1);
} function two() {
alert(2);
} one = Functions.add(one, two);
one();