每当我启动Windows Store应用程序时,都会出现错误消息“警报”未定义。我正在尝试查询Azure移动服务中的表,并从该表的“ type_of_service”列中列出一个列表。

var typeOfServiceTable = client.getTable('TypeOfService');

// Create a list of type of services
var query = typeOfServiceTable.select("type_of_service").read().done(function (results) {
     alert(JSON.stringify(results));
}, function (err) {
     alert("Error: " + err);
})

最佳答案

alert()不能在Windows Store应用程序上使用。

代替使用alert(),请尝试以下功能:

var msg = new Windows.UI.Popups.MessageDialog("Hello Windows!");
msg.showAsync();

10-05 20:57
查看更多