Outputs an error message to the Web Console.
注意: 此特征可用于 Web 工作者 .console.error(obj1 [, obj2, ..., objN]); console.error(msg [, subst1, ..., substN]); console.exception(obj1 [, obj2, ..., objN]); console.exception(msg [, subst1, ..., substN]);
注意:
console.exception()
是别名化的
console.error()
; they are functionally identical.
obj1
...
objN
A list of JavaScript objects to output. The string representations of each of these objects are appended together in the order listed and output.
msg
A JavaScript string containing zero or more substitution strings.
subst1
...
substN
msg
. This gives you additional control over the format of the output.
见
把文本输出到控制台
在文档编制的
console
了解细节。
| 规范 | 状态 | 注释 |
|---|---|---|
|
控制台 API
The definition of 'console.error()' in that specification. |
实时标准 | 初始定义 |
| 桌面 | 移动 | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
error
|
Chrome 1 | Edge 12 | Firefox 4 | IE 8 | Opera 10.5 | Safari 3 | WebView Android 1 | Chrome Android 18 | Firefox Android 4 | Opera Android 11 | Safari iOS 1 | Samsung Internet Android 1.0 |
| Substitution strings | Chrome Yes |
Edge
12
注意事项
|
Firefox 9 |
IE
10
注意事项
|
Opera ? | Safari ? | WebView Android Yes | Chrome Android Yes | Firefox Android 9 | Opera Android ? | Safari iOS ? | Samsung Internet Android Yes |
完整支持
兼容性未知
见实现注意事项。