解决 IE8 不支持console


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;
})();

//放在<script></script>的下面第一行

posted @ 2017-11-16 16:21  Lcy_Sun  阅读(516)  评论(0编辑  收藏  举报