sencha touch :: 是否可以(以及如何)在面板内或外部浏览器窗口中打开网站?

发布于 2024-11-19 08:33:39 字数 141 浏览 6 评论 0原文

我想知道是否以及如何可以在移动 Safari 的面板内或外部浏览器窗口中打开网站!我尝试在面板内打开一个网站,但由于跨域问题,仅加载了没有 css 的 htm。

有什么想法吗?

谢谢!

编辑:假设我们使用phoneGap

i wonder if and how it is possible to open a website inside a panel or in an external browser window of the mobile safari! I tried to open a website inside a panel but due to crossdomain problems only the htm without the css was loaded.

any ideas?

thnx!

edit: let's say, we use phoneGap

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

带上头具痛哭 2024-11-26 08:33:39

据我所知,跨域问题确实会阻止您使用 IFRAME 解决方案在应用程序内显示外部链接。

目前最好的解决方案是让链接包含 target="_blank" 以强制打开新的浏览器窗口。

As far as I know, cross-domain issues do block you from IFRAME solutions for displaying external links inside your app.

Best solution currently is to have links include target="_blank" to force a new browser window to open.

メ斷腸人バ 2024-11-26 08:33:39

@Stevanicus @Dalar 如果您使用Phonegap并使用phonegap.plist白名单属性允许域,它确实会在Mobile Safari中打开一个新窗口,但如果您执行类似的操作,则

var rateMsg = Ext.Msg.confirm('Title', 'Some message', function(e) {
                 if(e == 'yes')//If user confirms yes
                 {       
                    window.open("http://www.example.com", "_blank");//We open a link with _blank to use mobile safari and not your webview
                 }
              });

它不起作用。

@Stevanicus @Dalar It does open a new window in Mobile Safari if you use Phonegap and allowed domains using phonegap.plist whitelist property, but if you do somthing like

var rateMsg = Ext.Msg.confirm('Title', 'Some message', function(e) {
                 if(e == 'yes')//If user confirms yes
                 {       
                    window.open("http://www.example.com", "_blank");//We open a link with _blank to use mobile safari and not your webview
                 }
              });

It does not work.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文