跨平台移动开发_Windows 8平台使用 PhoneGap 方法

原文地址:

Using PhoneGap in Windows 8 Store Applications

下载phonegap 2.9.1

下载地址: https://codeload.github.com/phonegap/phonegap/zip/2.9.1

 

点击下载源代码

 

1.创建 JavaScript 空白应用程序

将项目中default.html 修改 index.html 

 

 

2.在项目中,双击打开package.appxmanifest文件将start page default.html 修改 index.html

 

3.导入cordova.jsjs文件夹,在index.html页面添加

 

4.在body标签里面加上script

 

<script type="text/javascript">
        console.log("Subscribing top deviceready event……");
        document.addEventListener("deviceready",function(){
        navigator.notification.alert("This device is ready");
        });
 </script>

 

5.获取开发许可证,调试运行

 

6.PhoneGap Windows8 环境

 

 

posted @ 2013-11-09 10:35  凡酷软件  阅读(322)  评论(0编辑  收藏  举报