原文转至 非常详细
http://www.blogjava.net/caihaibo2008/archive/2008/05/14/200386.html?opt=admin
使用视频:
http://www.digitalmediaminute.com/screencast/firebug-js/
补充示例
格式化字符串 类型
%s 字符串
%d, 整型
%i (暂不支持数字型)
%f 浮点型 (暂不支持数字型)
%o 链接对象
!ie 表示IE不支持, different ie 表示火狐与ie输出值不同,经测试IE9,其他尚不明确
<span style="white-space:pre"> </span>var a = "I Love You ";
var b = 520;
var c = "Beautiful Girl!";
//console.group('开始分组:'); // !ie
console.log("The Value is %s and the Value of the b is %d and I like %s",a,b,c);
console.log("Thank You ",5,2,0);
//console.groupEnd();// !ie
console.info("this is a Info Model!");
console.warn("this is a Warn Model!");
console.error("this is a Error Model!");
console.log(window,document); // different ie
//console.debug("this is a Debug Model!");// !ie
// console.dir(window); // 列出对象的所有属性 different ie
// console.dirxml(document.getElementById("con_test")); // !ie
// console.time('onload'); // 测试onload函数代码运行速度 !ie
// console.timeEnd('onload'); // !ie