mainpage.html
<html>
<div id="123" name="foo"></div>
<iframe src="/innerpage.html"></iframe&g开发者_高级运维t;
</html>
innerpage.html:
<html> 
 and here is some GWT widget that needs to access the div with id="123":
 DOM.getElementById("123").getAttribute("name") 
</html>
Is it possible to access the div on mainpage within the inner page?
Using jsni you can do this:
iframe accessing parent DOM?
You should be able to do this using parent.getElementById("123");
Note that the innerpage and mainpage will likely need to be within the same domain to prevent this getting flagged as cross-site scripting.
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论