Answers for "display console in html"

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
2

html console text

<script>
  console.log('%c text', 'background:---; color:---; font-size:---;');
</script>
Posted by: Guest on June-19-2020

Code answers related to "display console in html"

Code answers related to "Javascript"

Browse Popular Code Answers by Language