Home > Web Front-end > JS Tutorial > body text

javascript 在firebug调试时用console.log的方法_javascript技巧

WBOY
Release: 2016-05-16 17:53:58
Original
1220 people have browsed it

console.log();

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


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

console.log("The %s jumped over %d tall buildings", animal, count);

格式化字符串 类型
%s 字符串
%d, 整型
%i (暂不支持数字型)
%f 浮点型 (暂不支持数字型)
%o 链接对象

console.log()用法

复制代码 代码如下:





javascript的console.log()用法





Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!