-
Console. log: Output information on the console.
-
Console. dir: Displays all properties and methods of an object.
-
Console. dirxml: HTML/XML code contained in a node used to display a web page.
<body> <! DZM </div> <script> // Get div const div = document.getelementById ('my-div'); // Normal output console.log('console.log:', div); // Output object structure console.dir(div); // Output object HTML/XML code console.dirxml('console.dirxml:', div); </script> </body>Copy the code