JS方法使用匿名函数作为参数 2022-08-21 14:46:29 var Util={ alert:function(msg, anonymous){alert(msg);if(anonymous){setTimeout(function(){anonymous();// 执行匿名方法},500);}},};调用alert方法Util.alert('hello',function(){ location.href="csdn.net";})