gpt4 book ai didi

cordova - Iframe无法正常工作Phonegap网络错误发生http ://www.digiwebtech.com/Promotion/

转载 作者:行者123 更新时间:2023-12-03 08:53:26 26 4
gpt4 key购买 nike

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

网址是-http://www.digiwebtech.com/Promotion/
这个网址在网上可以正常使用,但是当我将此网址作为iframe的来源时,它给出了错误“网络错误已发生http://www.digiwebtech.com/Promotion/

对于构建此应用程序,我正在使用在线Phonegap构建
build.phonegap.com

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

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

我的Index.html代码-

<!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>

最佳答案

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

关于cordova - Iframe无法正常工作Phonegap网络错误发生http ://www.digiwebtech.com/Promotion/,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34587164/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com