【问题标题】:Toast notification from theme来自主题的 Toast 通知
【发布时间】:2020-06-13 03:27:44
【问题描述】:

我正在为我的 web 应用使用由 bootstrap 和 sass 制作的主题。

我对 bootstrap 和 sass 不是很熟悉。

我需要知道如何让代码插入到我的网络应用中。

You can see the notification example builder here

And more info abou the theme here

所以...我需要设置一个 toast 通知并在此功能上使用它(用于警报):

function validarNombre () {
    var tituloAlbm = document.querySelector("#dni").value;
    console.log(tituloAlbm);
    if (tituloAlbm == "" ) {
            alert("Please Fill All Required Field");
            return false;
    } else if (tituloAlbm !== null){
        add();
    }
}

我知道这是一个非常模糊的问题,但我真的被困在这个问题上......

提前谢谢你。

亲切的问候。

【问题讨论】:

    标签: html sass notifications toastr bootstrap-toast


    【解决方案1】:

    我喜欢使用 Alertify JS。

    您只需要通过 CDN 或从静态文件夹调用 Alertify 并在脚本中调用它。

    您可以在JsFiddle 上查看演示

    在此处查看默认通知部分:https://alertifyjs.com/

    您可以使用这些属性

    alertify.alert('Ready!');
    
    alertify.success('Success message');
    
    alertify.error('Success message');
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-10-17
      • 2022-11-25
      • 2016-06-24
      • 2020-04-24
      • 2016-09-26
      相关资源
      最近更新 更多