2014-02-15 25 views
0

我正尝试使用PhoneGap为iOS构建我的第一个项目。我从这个页面拿起一个例子:jquery移动应用程序不会在iPhone上显示样式文本

http://www.codeproject.com/Articles/579532/Building-an-iPhone-App-using-jQuery-Mobile

而且我的代码看起来像这样改变参考1.4.1后,ANS 1.9:

<!DOCTYPE html> 
<html> 
<head> 
    <meta charset="utf-8" name="viewport" content="width=device-width, initial-scale=1"> 
    <title>Task Timer</title> 
    <link rel="stylesheet" href="http://code.jquery.com/mobile/1.4.1/jquery.mobile-1.4.1.min.css" /> 
    <script src="http://code.jquery.com/jquery-1.9.1.min.js"></script> 
    <script src="http://code.jquery.com/mobile/1.4.1/jquery.mobile-1.4.1.min.js"></script> 
</head> 
<body> 
    <div id="tasksPage" data-role="page"> 
     <div data-role="header" data-position="fixed"> 
      <a href="#" data-role="button">Edit</a> 
      <h1>Task Timer-1</h1> 
      <a href="#" data-role="button" data-icon="plus" data-iconpos="notext">Add</a> 
     </div> 
     <div data-role="content"> 
      <ul id="taskList" data-role="listview"> 
       <li onclick="alert(1)">Task 1</li> 
       <li onclick="alert(2)">Task 2</li> 
      </ul> 
     </div> 
     <div data-role="footer" data-position="fixed"> 
      <a href="#" data-role="button">About</a> 
     </div> 
    </div> 
</body> 
</html> 

此页面,如果你复制到html文件将显示格式化文本。但是,当我将应用程序复制到iPhone时,它会显示简单的文字。

有人能告诉我我做错了什么吗?

+0

phonegap版本? – jcesarmobile

+0

最新的一个(3.x) – Anjum

回答

0

我想我刚刚解决了这个问题。

我在主html文件中对cordova.js做了引用。作为预防措施,将cordova.js复制到www文件夹中。文本开始出现,格式化为JQM方式。

相关问题