window.log = function(){ if(!window.console ){ return; } var arr = [].slice.call(arguments); arr.unshift('(app)') console.log.apply(this,arr) ; } ; log(2)
window.log = function(){ if(!window.console ){ return; } var arr = [].slice.call(arguments); arr.unshift('(app)') console.log.apply(this,arr) ; } ; log(2)
转载于:https://www.cnblogs.com/dhsz/p/7052756.html