iframe에 액세스하려고하면이 오류가 발생하고 잘못된 작업을 수행 할 수 있는지 잘 모르겠습니다. 누군가이 문제로 나를 도울 수 있습니까?Iframe에 액세스
catch되지 않은 형식 오류 : 정의되지 않은
catch되지 않은 형식 오류의 특성을 읽을 수 없습니다 '문서를'정의되지 않은
의 특성 'readyState의'를 읽을 수 없습니다var ifrm = document.getElementById('iframe'),
ifrm = (ifrm.contentWindow) ? ifrm.contentWindow :
(ifrm.contentDocument.document)
? ifrm.contentDocument.document :
ifrm.contentDocument;
ifrm.open();
ifrm.write("Hello World!");
ifrm.close();
이 내가받을 오류가 있습니다
*** 읽을 수 없습니다 특성 '문서'정의의 ***와 같은
는 – xandercoded
'iframe.contentWindow'이 아닌 크로스 브라우저 꽤 명확하다? –
참고 : 중첩 된 삼항 연산자에 "아니오"라고 말하십시오. – FishBasketGordo