Jak uzyskać ten potomny element HTML w JavaScript?

Mam ramkę iframe, która wygląda tak:

<iframe id="iframe2" ...>
    #document
        <html>...</html>
</iframe>

Próbuję dostać przedmiot podiframe zhtml etykietka.
W JavaScript, kiedy to robię:

document.getElementByID("iframe2")

zwraca poprawną ramkę iframe.

Jednak kiedy to robię:

document.getElementByID("iframe2").childNodes

wartość zwracana to[].

document.getElementByID("iframe2").getElementsByTagName("#document") idocument.getElementByID("iframe2").getElementsByTagName("html") także wróć[].

Jak uzyskać do tego dostęphtml etykietka?
Co to jest#document tag nazwany?

questionAnswers(4)

yourAnswerToTheQuestion