所以我在玩documentJavaScript,作为使用document.getElementById. 但是为什么document.all等于null?我运行了一些命令来证明它更加“虚假”。
document.all // HTMLAllCollection[1276]
document.all[0] // <html>...</html>
typeof document.all // 'undefined'
!{} // false. works correctly
!document.all // true! WTF
这是什么?其他对象工作正常。对象怎么了document.all?它坏了吗?