javascript - Access a variable of iframe from parent - Stack Overflow
Using contentWindow
instead of contentDocument
works for me:
var check = document.getElementById("iframeid").contentWindow.a;
Also, ensure that the domains match and that you are using a webserver to test (I got a protocol warning when testing from the file system).
Read full article from javascript - Access a variable of iframe from parent - Stack Overflow
No comments:
Post a Comment