我正在尝试使用navigator.notification.prompt从用户那里获取输入,并使用了以下在模拟器中运行和运行的代码。
我知道函数editInstallQtyPrompt正在运行,因为警报触发并具有我想要的id,但提示不显示
function editInstallQtyPrompt() {
var id = $(this).attr('id');
projId = id.substring(5);
alert(projId);
var value = $(this).text();
var max = $(this).attr('max');
navigator.notification.prompt(
'Please enter a value',
function(results){onEditInstallQtyPrompt(results, projId, value, max)},
'Edit install qty',
['Ok','Cancel']
);
}
我可以看到Stackoverflow上有很多这样的实例。我发现的那些倾向于暗示我的cordova引用存在问题但是我的构建中只有一个cordova-2.7.0.js(我可以看到)并且它被引用所以我不知道该去哪里从这里。
任何帮助将不胜感激