我想在网页中显示javascript document
对象,就像它在控制台中显示为对象打开的下拉列表一样。有没有什么方法可以让我们在网页上显示一个javascript对象,而不需要像控制台那样知道它的结构?
发布于 2020-08-16 14:34:25
看看这个:
<html>
<head>
<script type="text/javascript">
for(var prop in document)
document.write(prop + ' = ' + document[prop] + '<br>');
</script>
</head>
<body></body>
</html>
https://stackoverflow.com/questions/63433486
复制相似问题