The Firebug console has little-known usage

Source: Internet
Author: User

 

For a long time, due to the lack of a standardized debugging environment and a powerful development platform. In terms of HTML, CSS, JavaScript, and other technologies, people need to invest a lot of time and energy to perform boring tests. However, the emergence of Firebug greatly saves the development time of Web developers. In particular, its JavaScript Console makes HTML pages active in developers' hands.

The console is the most commonly used. log, lele.info, and console. error: these methods are useful, whether directly outputting JavaScript running results or implementing the connection between the WordPress and JavaScript in HTML. You only need a simple console. log (someVariable); or a line of com. flash. external. externalInterface. call ("console. log ", someVariable); then you can see the result of the variable (expression.

However, the Console actually provides many powerful API interfaces. Many friends do not seem to know yet. I will share with you a few of what I know.

Console. dir (anyObject )-Structure of the directly output object, Example

Console. dirxml (anyDOMNode )-Similar to the preceding example, the HTML node content is output in indent format,

Console. time (slugName)-console. timeEnd (slugName )-Records the execution time of a timestamp and can be used to optimize loop statements,

Console. group ()-console. groupEnd ()-Group output content, see the figure to understand:

 

 

From: http://xinsync.xju.edu.cn/index.php/archives/3724

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.