摘要:
因为ie不支持console.log的原因 封装了一层 代码如下function debug(){ window.console && console.log.apply(null , arguments);}FF下正常 chrome下把错uncaught typeerror illegal invocation原因是console.log的运行上下文要求是console不能是其它任何别的objectconsole.info.call(this,"stuff")TypeError:Illegal invocationconsole.info.call(con 阅读全文