Answers for "javascript show console on page"

20

how to print to console javascript

console.log("string")
Posted by: Guest on February-13-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 show console on page"

Code answers related to "Javascript"

Browse Popular Code Answers by Language