ie8不支持console.log()的解决方法
1、在ie8(其他版本没测)下用console.log('abc') 在控制台调试会报错,如下图:
2.解决方法
window.console = window.console || (function () { var c ={};
c.log = c.warn = c.debug = c.info = c.error = c.time = c.dir = c.profile= c.clear = c.exception = c.trace = c.assert = function(){}; return c; })();