IE8提示‘console’未定义错误的解决方案

dhso
2016/11/02 22:42
统计中

在js末尾加入代码

// IE8 console.log() 未定义错误
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; 
})();

本文为 dhso 原创

发布在 http://blog.minws.com/ie8ti-shi-consolewei-ding-yi-cuo-wu-de-jie-jue-fang-an/

如有转载,请标明来源!

作者信息
姓名:dhso
热评文章
最新评论
文章概览