generated at
JavaScriptでiframe内の要素を取得する
JavaScriptiframe内の要素を普通に取得しようとしてもエラーが出る。

まず、 .contentWindow.document で、iframe内の全要素を取得して、そこからは通常と同じように要素を取得する。

sample.js
var subdoc = document.getElementById("product-description-iframe").contentWindow.document; var detail = subdoc.getElementById("productDetailsTable");