document.getElementsByTagName( “正文”)
在mozilla上使用javascript控制台在omegle.com上执行上面这行我得到一个空数组为什么会这样?在查看页面源时,身体标签似乎就在那里。
答案 0 :(得分:0)
因为它实际上没有<body>
元素,浏览器只是试图渲染它,你可以看到页面源:
</head>
<!-- Yes, I'm using frames as a load balancing measure. Yes, I know
this is horrible, insane, absurd, ridiculous, stupid, and
broken. It's just a temporary stop-gap measure, though. -->
<frameset cols="100%">
<frame src="http://bajor.omegle.com/">
</frameset>
</html>
请注意,<frameset>
元素 不应与<body>
一起使用,因此这是correct usage。