2014-12-13 134 views
0

我想开发phoneGap,jQuery的移动应用程序,之前我导入jQuery的移动我的网页正常运行,当我导入jquery手机,并运行index.html我得到这些弹出窗口浏览器卡住时,与jQuery手机使用手机差距

enter image description here

当我短声OK我得到了

enter image description here

,当我点击确定页面卡住了,当我跑这对Firefox的我也得到

enter image description here

我的项目文件夹屏幕截图(见我的文件)

enter image description here

任何一个可以请提供任何帮助吗?

我的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 --> 
      <meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height, target-densitydpi=device-dpi" /> 
      <link rel="stylesheet" type="text/css" href="css/index.css" /> 
      <link href="jQueryMobile/jquery.mobile-1.4.5.min.css" rel="stylesheet" type="text/css" /> 
      <script src="js/jquery.js" type="text/javascript"></script> 
      <script src="jQueryMobile/jquery.mobile-1.4.5.min.js" type="text/javascript"></script> 
      <title>Hello World</title> 
     </head> 
     <body> 


      <!-- 
      <div class="app"> 
       <h1>PhoneGap</h1> 
       <div id="deviceready" class="blink"> 
        <p class="event listening">Connecting to Device</p> 
        <p class="event received">Device is Ready</p> 
       </div> 
      </div> 
      --> 

      <div data-role="header"> 

      <h1>Your resource app</h1> 

      </div> 

      <div dara-role="content"> 

        <a href="page2.html" data-role="button" data-rel="back" data-theme onclick="myFunction()">Go</a> 


      </div> 

      <div dara-role="footer"> 

       <h4>&copy; carsRent.ps</h4> 

      </div> 

      <script> 
      function myFunction() { 
       window.alert("fff"); 
      } 
      </script> 
      <script type="text/javascript" src="cordova.js"></script> 
      <script type="text/javascript" src="js/index.js"></script> 
      <script type="text/javascript"> 
       app.initialize(); 
      </script> 


     </body> 
    </html> 

回答

1

不要单击确定。按退出键或单击取消。

当我使用PhoneGap进行开发时,通常会将脚本链接注释到PhoneGap,以便我不会看到那些弹出窗口。

在这一行你的情况评论:

<script type="text/javascript" src="cordova.js"></script> 

确保部署到设备之前,取消对该行。

0

你不能在你的浏览器中测试它。你需要在你的android/ios模拟器和实际的手机设备中进行测试。