0

I want to Display javascript document object in webpage, in the same way it is displayed in console as object opening as dropdown. Is there any way by which we can display a javascript object on webpage without knowing its structure in the same way as console does?

1
  • what you have tried so far ? Commented Aug 16, 2020 at 6:04

1 Answer 1

1

Check this out:

<html>
<head>
    <script type="text/javascript">
        for(var prop in document)
            document.write(prop + ' = ' + document[prop] + '<br>');
    </script>
</head>
<body></body>
</html>

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.