In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly explains "how to output JavaScript from the console". The content in 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 how to output JavaScript from the console.
Output method: 1, use "console.log" statement to output information; 2, use "console.info" statement to output information; 3, use "console.warn (warning)" statement to output warning information; 4, use "console.error" statement.
The operating environment of this tutorial: windows7 system, javascript1.8.5 version, Dell G3 computer.
In JavaScript, you can use the methods of the Console object to output from the console.
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.
When the method describes the output information of the instance error (), a red fork is added to the front to indicate the error, and the stack where the error occurred is displayed. Console.error ("Error:% s (% I)", "Server is not responding", 500) info () console.log alias, output information console.info (") log () output information console.log (") warn () output warning information console.warn ("warning")
In Chrome browsers, for example, we can open the Console window by pressing F12 or Control+Shift+i (PC platform) / Alt+Command+i (Mac platform).
Thank you for your reading, the above is the content of "how to output JavaScript from the console". After the study of this article, I believe you have a deeper understanding of how to output JavaScript from the console, 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.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.