Window.console - Web APIs 编辑
The Window.console
property returns a reference to the Console
object, which provides methods for logging information to the browser's console. These methods are intended for debugging purposes only and should not be relied on for presenting information to end users.
Examples
Logging to console
The first example logs text to the console.
console.log("An error occurred while loading the content");
The next example logs an object to the console, with the object's fields expandable using disclosure widgets:
console.dir(someObject);
See Usage in console for more thorough examples.
Specifications
Specification | Status | Comment |
---|---|---|
Console API | Living Standard | Initial definition. |
Currently there are many implementation differences among browsers, but work is being done to bring them together and make them more consistent with one another.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论