📜  jquery 用户函数覆盖 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:03:06.335000             🧑  作者: Mango

代码示例1
function helloWorld (argument) {
    alert(argument);
}
/*Now, if you want to override this function then*/
var origHelloWorld = window.helloWorld;
window.helloWorld = function(argument) {
        //your code
        origHelloWorld(argument);     // after your code if you want to call original function 
}