firebug 控制
Firebug is the ultimate Web Developer debugging tool. Firebug gives you control over the page's XHTML, JavaScript, CSS, AJAX requests, and more. It's important not to simply take in what Firebug tells you though -- you can log information to your Firebug console from within your page's JavaScript. Here are a few of the helpful methods you can use:
Firebug是终极的Web Developer调试工具。 Firebug使您可以控制页面的XHTML,JavaScript,CSS,AJAX请求等。 重要的是不要简单地接受Firebug告诉您的内容-您可以从页面JavaScript中将信息记录到Firebug控制台中。 以下是一些可以使用的有用方法:
The console.log() method logs a message to the console without providing a line number. Simple but useful.
console.log()方法将消息记录到控制台,但不提供行号。 简单但有用。
The console.debug() method logs a message to Firebug console just like log(), but debug() provides a line number reference.
console.debug()方法将消息记录到Firebug控制台,就像log()一样,但是debug()提供行号参考。
The console.info() method logs a message to the Firebug console with a blue "information" icon. Line number reference is included.
console.info()方法将带有蓝色“信息”图标的消息记录到Firebug控制台。 包括行号参考。
console.warn() sets a warning within the console. The warning provides a yellow background color to easily spot warnings within the console.
console.warn()在控制台内设置警告。 该警告提供了黄色的背景颜色,可轻松在控制台内发现警告。
The console.error() method places a custom error message within the console with a pink background. Easy to spot.
console.error()方法将自定义错误消息放入带有粉红色背景的控制台中。 容易发现。
Each of the above methods accept an "object", or array of objects, and works much like a print-f.
上面的每种方法都接受一个“对象”或对象数组,其工作方式与print-f非常相似。
This probably looks familiar to a PHP programmer.
PHP程序员可能对此很熟悉。
Make the most of your Firebug -- send your own message to the console!
充分利用您的Firebug-将您自己的消息发送到控制台!
翻译自: https://davidwalsh.name/firebug-console-log
firebug 控制
相关资源:jdk-8u281-windows-x64.exe