Blogger Information
Blog 54
fans 4
comment 1
visits 54932
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
Console 对象的使用
神仙不在的博客
Original
655 people have browsed it

在控制台中显示指定JavaScript对象的属性,并通过类似文件树样式的交互列表显示

console.dir(object);

实例

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>getElementById</title>
</head>
<body>
<p id="big">这是一个段落</p>
<p>这飒飒大苏打一个段落</p>
<p>这也是的是的落</p>
<p>这也实打实大苏打实打实落</p>
<script>
var p = document.getElementById('big')
    console.log(p);
    console.log(typeof p);
   console.dir(p);
</script>
</body>
</html>

运行实例 »

点击 "运行实例" 按钮查看在线实例


Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post