科爾多瓦 - 插件的對話框:navigator.notification.prompt不能正常工作
function onPrompt(results) {
if (results.buttonIndex == 1) {
alert('sucess');//working
} else {
alert('fail');//not working
}
}
navigator.notification.prompt(
'Please enter your name',
onPrompt,
'Registration',
['Ok', 'Exit'],
'Maruthi'
);
onprompt()else部分不工作時,用戶按下退出,但如果正確的工作作爲其預期當用戶按確定按鈕。
alert(results.buttonIndex); ...提醒按鈕getindex並檢查... – Banik
我測試了你的代碼,它在Android和iOS上工作正常。你在測試哪個平臺?你確定你正在使用更新的插件嗎? – jcesarmobile
我正在Windows平臺(OS Windows Mobile 10)中測試它。現在工作很好。我的邏輯與我有不同的問題。謝謝。 –