在此代码中,
<html>
<head>
<meta charset="UTF-8">
<script>
window.onload = myfunc;
function myfunc(){
window['document'] = null;
console.log(window['document']);
}
</script>
</head>
<body>
<h1>My First Web Page</h1>
<p>My first paragraph.</p>
</body>
</html>
尽管赋值为null,为什么DOM接口window['document']
不为空?如下图所示...