To tłumaczenie jest niekompletne. Pomóż przetłumaczyć ten artykuł z języka angielskiego.
Niestandardowy
This feature is non-standard and is not on a standards track. Do not use it on production sites facing the Web: it will not work for every user. There may also be large incompatibilities between implementations and the behavior may change in the future.
Wyświetla tekst w konsoli.
Uwaga: This feature is available in Web Workers.
Syntax
console.log(obj1 [, obj2, ..., objN]); console.log(msg [, subst1, ..., substN]);
Parameters
obj1...objN- Lista obiektów JavaScript do wyświelenia. Podane obiekty są kolejno dołączane i przekazywane na wyjście.
msg- String JavaScript zawierający zero lub więcej stringów podmieniających.
subst1...substN- Obiekt JavaScript w którym zastępowane są stringi podmieniające z msg. Daje Ci to dodatkową kontrolę nad formatem.
Zobacz również Outputting text to the console w dokumentacji console.
Specifications
| Specyfikacja | Status | Komentarz |
|---|---|---|
| Console API The definition of 'console.log()' in that specification. |
Editor's Draft | Początkowa definicja |
Browser compatibility
| Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari |
|---|---|---|---|---|---|
| Podstawowe wsparcie | (Yes) | 4.0 (2.0) | 8 | (Yes) | (Yes) |
| Stringi podmieniające | (Yes) 28[1] |
9.0 (9.0) | 10[2] | (Yes) | (Yes) |
| Available in workers | ? | 38.0 (38.0) | ? | ? | ? |
| Feature | Android | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Safari Mobile |
|---|---|---|---|---|---|
| Podstawowe wsparcie | ? | 4.0 (2.0) | ? | ? | ? |
| Stringi podmieniające | ? | 9.0 (9.0) | ? | ? | ? |
| Available in workers | ? | 38.0 (38.0) | ? | ? | ? |
[1] Jeśli ujemna wartość jest przekazana do %d, zostanie ona zaokrąglona w dół do najbliższej ujemnej wartości całkowitej, więc -0.1 stanie się -1.
[2] %c nie jest wspierana, %d będzie renderowana jako 0, kiedy nie jest liczbą.
Zobacz również
- Opera Dragonfly documentation: Console
- MSDN: Using the F12 Tools Console to View Errors and Status
- Firebug wiki: Console API - Firebug supports additional features in its console.log() implementation, such as styled logging.
- NodeJS: Console API
Autorzy i etykiety dokumentu
Autorzy tej strony:
AgnieszkaPanek
Ostatnia aktualizacja:
AgnieszkaPanek,