In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly explains "what is the method of javascript console Console object". The content of the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "what is the method of javascript console Console object".
The js console methods are: assert (), clear (), count (), error (), group (), groupEnd (), info (), log (), table (), time (), timeEnd (), trace (), warn (), etc.
The operating environment of this tutorial: windows7 system, javascript1.8.5 version, Dell G3 computer.
Javascript console Console object
The Console object is used for JavaScript debugging.
By default, there is no Console object in the JavaScript native, which is a built-in object provided by the host object (that is, the browser). Used to access the debugging console, the effect may be different in different browsers.
There are two common uses of Console objects:
Displays an error message when the web page code is running.
Provides a command line interface for interacting with web code.
Methods of Console object
Method description the assert () assert method accepts two parameters, the first is an expression and the second is a string. Only if the first parameter is false will the second parameter be output, otherwise there will be no result. Clear () clears all output from the current console and resets the cursor to the first line. Count () is used to count how many times it has been called. When error () outputs information, a red fork is added to the front to indicate the error, and the stack where the error occurred is displayed. Group () is used to group the displayed information, which can be collapsed and expanded. GroupCollapsed () is very similar to the console.group method, except that the content of the group is collapsed rather than expanded when it is first displayed. GroupEnd () ends the inline grouping info () console.log alias, and the output information log () output information table () converts the compound type data into a table display. Time () timing starts timeEnd () timing ends the call to the trace () tracking function warn () outputs a warning message
Common Console debugging commands
Console.log ('hello'); console.info (' information'); console.error ('error'); console.warn ('warning')
Thank you for your reading, the above is the content of "what is the method of javascript console Console object". After the study of this article, I believe you have a deeper understanding of what the method of javascript console Console object is, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.