我正在開發cordova混合應用程序。我需要點擊按鈕並顯示自定義錯誤信息給用戶。但是,我意識到Cordova Dialog Plugin,notification.alert()正文消息不支持html標籤。我可否知道如何將html標籤添加到notification.alert()的消息正文中,以便在我的Cordova應用程序中自定義通知對話框?以下是我的代碼。Cordova對話框插件:在notification.alert消息中插入html標籤
function alertDismissed() {
console.log("alert has been triggered and dismissed ");
}
navigator.notification.alert(
'<html><h1>Error!!></h1><br><a>Source Code Error</a></html>',
alertDismissed,
'Asset Details',
'Ok'
);
使用HTML和Css而不是使用Cordova對話框插件自己創建一個對話框 – PraveenKumar