最新文章列表

兼容console.log

在js前端开发时,为了调试经常会加上 console.log.但是在有的浏览器(比如IE)中会报错 怎么办呢? 在js文件最前面添加如下js代码: if (window.console === undefined) { console = { log: function () { }, info: function () { } ...
hw1287789687 评论(0) 有1733人浏览 2015-08-01 15:03

简单修改nodejs中的console.log方法

var fs = require('fs'); var oldWrite = process.stdout.write; process.stdout.write = function(d) { fs.writeFile('log.txt', d); oldWrite.apply(this, arguments); }; 重定向到一个文件中去。
lipengyu2006 评论(0) 有1730人浏览 2014-09-26 11:05

Prevent IE crash console.log

origin   When the console is close and we call console.log from javascript most of the times Internet Explorer will crash with the message:  Error:'console' is undefined if (typeof console == 'undefin ...
lingceng 评论(0) 有971人浏览 2012-12-05 15:24

IE8/9控制台命令

IE 从IE8之后也支持控制台命令了,并且个人觉得还挺好用的,基本上满足需求了。   以下列出它的几条命令,以及效果截图,供大家参考参考,也为自己留个笔记。 我个人觉得可以分为三类,一是控制台日志输出相关,二是window切换的命令,三是页面采样报告的两个命令。   1、控制台输出相关的命令: console.log( msg, [, ... [, msgN ] ]  ); //日志co ...
qiang106 评论(0) 有79224人浏览 2012-11-09 00:31

ie下碰到的一个问题 console.log

在js中为了调试a变量,在js中加入了console.log(a);,然后在ie中发现和我想的不一样,在ie中执行到console.log(a);就不往下执行了。晕死啊。
huangyunbin 评论(5) 有8656人浏览 2012-08-13 16:59

最近博客热门TAG

Java(141741) C(73643) C++(68602) SQL(64557) C#(59604) XML(59131) HTML(59042) JavaScript(54916) .net(54782) Web(54511) 工作(54116) Linux(50906) Oracle(49861) 应用服务器(43285) Spring(40811) 编程(39452) Windows(39380) JSP(37540) MySQL(37266) 数据结构(36420)

博客人气排行榜

    博客电子书下载排行

      >>浏览更多下载

      相关资讯

      相关讨论

      Global site tag (gtag.js) - Google Analytics