Java Console in HTML
In HTML, the log() method is used to write a message in the console.
Utilizzo delle API Web
Probably one of the most frequently used commands by JavaScript beginners and veterans is log. In simile modo a DOM, Fetch, History, Service Workers, and Web Storage APIs, the console object is a Web API that the browser provides to the JavaScript Engine.
Visualizzazione del Log della Console in HTML
(function () {
var old = console. log;
var document = logger. getElementById('log').innerHTML;
la console. logger = function (message) {
if (typeof message == 'object') {
log. innerHTML += (JSON e JSON). stringify JSON? JSON; altrimenti, logger. innerHTML += message +'';