2017-04-19 33 views
0

我正在嘗試使用smartnotification插件的SmartMessageBox功能。首先我找不到關於它的許多文檔,所以如果你有任何的參考鏈接,請給我。其次,我試圖做的是有一個彈出式消息框(由SmartMessageBox功能提供),但我可以在其中插入一條消息,之後我將使用代碼中的其他位置。到目前爲止,我只看到SmartMessageBox「顯示」某些內容並給出點擊按鈕的機會的示例,但沒有涉及插入文本的可能性。提前致謝!如何在smartnotification.js插件的SmartMessageBox中插入文本

回答

0

這裏有一個例子:

$.SmartMessageBox({ 
    title: title, 
    content: content, 
    buttons: '[no][yes]' 
}, function (ButtonPressed) { 
    if (ButtonPressed === "yes") { 
     if(ifYes != null && ifYes != undefined) 
      ifYes(); 
    } 
    if (ButtonPressed === "no") { 
     if (ifNo != null && ifNo != undefined) 
      ifNo(); 
    } 
});