【问题标题】:Adding inApp browser inside a Div在 Div 中添加 inApp 浏览器
【发布时间】:2014-08-29 06:19:05
【问题描述】:

我正在使用 HTML5 PhoneGap 应用程序。 我想在我的应用程序中嵌入一个网站。我们可以为此使用 InApp Browser/ChildBrowser。但通常它作为另一个窗口加载。 我想在一个 Div 元素中添加 InApp Browser/ChildBrowser

喜欢给定的图片;

这里的页眉和页脚应该是可见的,这是应用程序的一部分。在 Dive 元素中,我想打开网站。有什么解决办法吗?

或者我们可以为此使用 iframe 吗?

我想为iPad 开发应用程序。

【问题讨论】:

  • 嗨@ullas-mohan-v 你找到答案了吗?我也需要这个,谢谢
  • @danisupr4 : 最后我使用“iframe”来满足我的要求。

标签: html cordova iframe inappbrowser childbrowser


【解决方案1】:

V, 据我所知,不能将inAppBrowserinline 属性一起使用。

当我上次这样做时,我按照你应该做的那样做 -> 使用 iFrame。您可以像这样使用 iframe:

<iframe src="../../../index.htm" width="90%" height="400" name="SELFHTML_in_a_box">
  <p>Sorry, but your browser can't display iframes <a href="../../../index.htm">SELFHTML</a></p>
</iframe>

但我会放弃&lt;p&gt; 标签。所以只使用 iFrame。

所以我希望这对你有所帮助。如果没有,请告诉我。那我再详细解释一下!

【讨论】:

  • "window.open()" 语法在哪里?
  • 当 iframe 内联显示时,你需要 window.open 做什么?当您想在新窗口(inappbrowser)中打开链接时,您只需使用它
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多