【发布时间】:2011-05-24 20:58:50
【问题描述】:
大家好,提前感谢您的帮助。这是我的情况:
我安装了 Phonegap 0.9.5,并且正在 Eclipse 中制作应用程序。我的所有设置都很好,并且在我的 Phonegap 应用程序的应用程序 assets/www/index.html 中:
<iframe id='downloader' frameborder='0' style='width:100%' src='http://www.myste.com/mobile/index.html'></iframe>
http://www.myste.com/mobile/index.html 有这个按钮:
<input style="position:relative;top:200px;z-index:5;" type="button" onclick="alert(parent.location.href)" value="DOES MOM EXIST?" />';
但由于某种原因,我返回一个“未定义”。我的最终目标是让 iframe 中的按钮调用父级(assets/www/index.html)中的函数:
onclick="parent.somefunction();"
谁能帮帮我?
【问题讨论】:
标签: java javascript android iframe cordova