调试代码导致IE出错的避免方法

上传:tjlrm 浏览: 11 推荐: 0 文件:PDF 大小:17KB 上传时间:2020-12-13 08:19:30 版权申诉
代码如下: if(!window.console){ var names = [“log”, “debug”, “info”, “warn”, “error”, “assert”, “dir”, “dirxml”,”group”, “groupEnd”, “time”, “timeEnd”, “count”, “trace”, “profile”, “profileEnd”]; window.console = {}; for (var i = 0; i < names.length; i++){ window.console[names[i]] = function() {}; } }
上传资源
用户评论