📜  toast js - CSS 代码示例

📅  最后修改于: 2022-03-11 14:47:59.810000             🧑  作者: Mango

代码示例2
var toastTrigger = document.getElementById('liveToastBtn')
var toastLiveExample = document.getElementById('liveToast')
if (toastTrigger) {
  toastTrigger.addEventListener('click', function () {
    var toast = new bootstrap.Toast(toastLiveExample)

    toast.show()
  })
}