首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Iframe不工作Phonegap网络错误发生http://www.digiwebtech.com/Promotion/

Iframe不工作Phonegap网络错误发生http://www.digiwebtech.com/Promotion/
EN

Stack Overflow用户
提问于 2016-01-04 16:27:40
回答 1查看 172关注 0票数 0

我有一个Phonegap应用程序( android ),这是一个简单的应用程序,它只有一个Iframe,它加载了一个网址

Url is - http://www.digiwebtech.com/Promotion/此Url在网上运行良好,但当我将此url作为源提供给iframe时,它给出错误"Network error Occured http://www.digiwebtech.com/Promotion/

为了构建此应用程序,我使用在线Phonegap构建build.phonegap.com

我无法理解实际的问题,在这种情况下,我所有的代码都是在线托管的,只有iframe是在index.html中

Index.html文件在本地计算机上工作正常

我的Index.html代码-

代码语言:javascript
复制
<!DOCTYPE html>
<!--
    Copyright (c) 2012-2014 Adobe Systems Incorporated. All rights reserved.

    Licensed to the Apache Software Foundation (ASF) under one
    or more contributor license agreements.  See the NOTICE file
    distributed with this work for additional information
    regarding copyright ownership.  The ASF licenses this file
    to you under the Apache License, Version 2.0 (the
    "License"); you may not use this file except in compliance
    with the License.  You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing,
    software distributed under the License is distributed on an
    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
     KIND, either express or implied.  See the License for the
    specific language governing permissions and limitations
    under the License.
-->
<html>
    <head>
        <meta charset="utf-8" />
        <meta name="format-detection" content="telephone=no" />
        <meta name="msapplication-tap-highlight" content="no" />
        <!-- WARNING: for iOS 7, remove the width=device-width and height=device-height attributes. See https://issues.apache.org/jira/browse/CB-4323 -->

        <link rel="stylesheet" type="text/css" href="css/index.css" />
         <link href="css/splashstyles.css" rel="stylesheet" />
        <title>DigiWebTech</title>
    </head>
    <body>
        <div class="">

<div class="splash fade-in">
        <h1 class="splash-title fade-in"></h1>
        <a href="#" class="splash-arrow fade-in"><img src="~/assets/img/down-arrow.png" /></a>
    </div>


            <div id="content" style="height: auto; width: auto; overflow: auto; -webkit-overflow-scrolling:touch;">
        <iframe class="frame" src="http://www.digiwebtech.com/Promotion/" style="position: absolute;min-width:100%;     min-height: 100%; border: none"   >  </iframe>
</div>
        </div>
        <script type="text/javascript" src="cordova.js"></script>
        <script type="text/javascript" src="js/index.js"></script>
        <script type="text/javascript">
            app.initialize();

        </script>
          <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script src="~/assets/js/main.js"></script>
    </body>
</html>
EN

回答 1

Stack Overflow用户

发布于 2016-07-12 21:42:42

您必须将在框架中显示的URL列入白名单。您必须允许在config.xml中进行导航

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/34587164

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档