Tho*_*mas 3 windows-phone-7 jquery-mobile cordova
我正在使用jQuery mobile(1.0.1.)在Windows Phone 7.5上尝试PhoneGap 1.4.基本导航正在工作,不幸的是我似乎无法获得警报.既没有警报("字符串);也没有PhoneGap的navigator.notification.alert(message,alertCallback,[title],[buttonName]);给我任何回复.WapMGap测试消息显示正常.这是我尝试调用的方式它:
function init()
{
document.addEventListener("deviceready",onDeviceReady,false);
}
function onDeviceReady()
{
document.getElementById("welcomeMsg").innerHTML += "PhoneGap is ready!";
alert('test');
navigator.notification.alert(
'You are the winner!', // message
alertDismissed, // callback
'Game Over', // title
'Done' // buttonName
);
}
Run Code Online (Sandbox Code Playgroud)
请参阅此Google网上论坛讨论.
简而言之,Windows Phone 7 IE9 Web浏览器不支持警报,而是必须使用PhoneGap Notification API,如下所示:
navigator.notification.alert("Message", callBackMethod, "Title", "Button Text");
Run Code Online (Sandbox Code Playgroud)
有关详细信息,请参阅PhoneGap Notification API.
| 归档时间: |
|
| 查看次数: |
5628 次 |
| 最近记录: |