Firebug API
{ Posted on 二 23 2009 by Xiacong }
用Firefox加载的页面,Firebug都添加了一个全局变量console,通过这个变量的若干方法,你可以通过脚本向控制台输出各种调试信息。
console.log(object[, object, ...])
往控制台写一条信息,可以有多个参数,甚至可以像printf那样格式化出去,例如
console.log("The %s jumped over %d tall buildings", animal, count);
或者这样:
console.log("The", animal, "jumped over", count, "tall buildings");
console.log("I am %s and I have:", myName, thing1, thing2, thing3);
下面是格式化参数表:
String Substitution Patterns
%s String
%d, %i Integer (numeric formatting is not yet supported)
%f Floating point number ...Read More »

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis tempor dui id erat. Donec commodo, nunc ac bibendum porta | 