Chinaunix首页 | 论坛 | 博客
  • 博客访问: 843219
  • 博文数量: 372
  • 博客积分: 10063
  • 博客等级: 中将
  • 技术积分: 4220
  • 用 户 组: 普通用户
  • 注册时间: 2012-02-24 11:36
文章分类

全部博文(372)

文章存档

2012年(372)

分类: 虚拟化

2012-05-09 18:56:00

console.log();

 当你使用console.log()函数时,下面的firebug一定要打开,不然这函数在用firefox运行时无效且影响正常程序,如果用IE打开,将会出错。

 

第一个参数可以是一个包含格式化占位符输出的字符串,例如:

console.log("The %s jumped over %d tall buildings", animal, count);
 
 格式化字符串      类型
%s                  字符串
%d,                  整型
%i                   (暂不支持数字型)
%f                   浮点型 (暂不支持数字型) 
%o                  链接对象
阅读(1267) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~