Can't access content of another frame in Chrome

后端 未结 4 478
感动是毒
感动是毒 2021-01-17 05:12

I have two frames. The pages in both frames come from the same domain (either localhost or a live domain - both using the same protocol).

The first frame needs to ac

4条回答
  •  滥情空心
    2021-01-17 06:19

    In Chrome, accessing window.frames[index] gets you a Window object, from which you can access good stuff like the document within that frame's content.

    Accessing it by document.getElementById returns only the iframe element itself, with almost no useful attributes for digging further into the DOM.

    This bug in not being able to access the Window object by its name using window.frames[name] the way other browsers do should be fixed!

提交回复
热议问题