var run = function(){ //is run } var aopBefore = function(){ //aopBefore } var tmpFn=run; run = function(){ aopBefore(); tmpFn(); }