我的第一个 PhoneGap 应用程序包含 2 个 HTML 文件。
第一个被命名为index.html
使用index.js
. 该文件将显示一个列表项。当我单击该列表中的一个项目时,它会将我带到detail.html
文件中:
$.mobile.changePage("detail.html", { transition: "slideup"});
或者
location.href = "detail.html";
在detail.html
页面上,我加载detal.js
. 然而它没有用。我无法在detail.js
.
请给我您的建议,有什么例子吗?
拍摄照片
<link rel="stylesheet" href="css/jquery.mobile.structure-1.3.0.min.css" /> <link rel="stylesheet" href="css/jquery.mobile-1.3.0.min.css" /> <link rel="stylesheet" href="css/getAbstract.min.css" /> <script src="js/jquery-1.9.0.min.js"></script> <script src="js/jquery.mobile-1.3.0.min.js"></script> <script src="js/jquery.ba-dotimeout.js"></script> <script src="js/jquery.dst.js"></script> <script type="text/javascript" charset="utf-8" src="js/cordova-2.5.0.js"></script> <script type="text/javascript" charset="utf-8"></script> </head> <body> <div data-role = "page" data-theme = "a" id = "pageContainer"> <!--Start Page Header --> <div data-role = "header" id = "pageHeader" data-nobackbtn = "true" data-position = "fixed"> <h1>Camera</h1> </div> <!--End Page Header --> <!--Start Page Content--> <div data-role = "content" id= "pageContent"> <a data-role = "button" id = "btnCaptureEdit" href = "">Capture Edit</a> <a data-role = "button" id = "btnLibraryPhoto" href = "">Get Photo From Library</a> <a data-role = "button" id = "btnAlbumPhoto" href = "">Get Photo From Album</a> </div> <!--End Page Content--> <!--Start Page Footer--> <div data-role = "footer" id = "pageFooter"> </div> <!--End Page Footer--> </div> <script src="js/detail.js"></script> </body> </html>