x
 
<!DOCTYPE html>
<html>
<body><p id="demo">������ť����� body Ԫ���ӽڵ�Ľڵ�����</p>
<button onclick="myFunction()">��һ��</button>
<script>
function myFunction()
{
var txt="";
var c=document.body.childNodes;
for (i=0; i<c.length; i++)
  {
  txt=txt + c[i].nodeName + "<br>";
  };
var x=document.getElementById("demo");  
x.innerHTML=txt;
}
</script>
<p><b>ע�ͣ�</b>Ԫ���еĿո������ı������ı��������ı��ڵ㡣</p>
</body>
</html>