Phonegap基于网络的应用"警报"显示页面的名称

时间:2014-06-18 19:03:05

标签: javascript ios cordova

我有一个适用于iPhone的网络应用,我通过PhoneGap使用UIWebView选项。

警告时会显示html页面的名称: enter image description here 我该如何隐藏它(login.html)?

我将alert函数与JavaScript

一起使用
alert("Email and Password do not match.");

1 个答案:

答案 0 :(得分:4)

是的ios phonegap页面会在警告中显示页面名称。您需要使用通知插件来避免这种情况。

这是插件

http://cordova.apache.org/docs/en/3.3.0/cordova_notification_notification.md.html#Notification

您只需要对话框插件,而不需要振动

 cordova plugin add org.apache.cordova.dialogs

要使用它,您需要

 navigator.notification.alert(
        'You are the winner!',  // message
        alertDismissed,         // callback
        'Game Over',            // title
        'Done'                  // buttonName
    );