Answers for "display console log in HTML"

18

how to print to console javascript

console.log("string")
Posted by: Guest on February-13-2020
6

javascript print

console.log("Who's Joe?")
Posted by: Guest on August-09-2020
1

display console log in HTML

(function () {
    var old = console.log;
    var logger = document.getElementById('log');
    console.log = function (message) {
        if (typeof message == 'object') {
            logger.innerHTML += (JSON && JSON.stringify ? JSON.stringify(message) : message) + '<br />';
        } else {
            logger.innerHTML += message + '<br />';
        }
    }
})();
Posted by: Guest on August-18-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language