文書の現在の最上位ノードを取得する方法

Node.prototype.ownerDocument

それは後に会ったが、されていないが、あなたは任意のノードでそれを得ることができ、発生する可能性があり、直接ドキュメントノードを取得することができません。

document.scripts [0] .ownerDocument === 文書。
// 

document.ownerDocument。
// ヌル

 

おすすめ

転載: www.cnblogs.com/aisowe/p/11504557.html