【发布时间】:2011-06-29 19:08:44
【问题描述】:
mainpage.html
<html>
<div id="123" name="foo"></div>
<iframe src="/innerpage.html"></iframe>
</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>
是否可以在内页中访问主页上的div?
【问题讨论】:
-
仅供参考——您不必将 gwt 部署为 iframe...
-
这也是一个好点,如果可以的话,我会将 GWT 直接部署到页面中,因为它也消除了其他令人头疼的问题。