导航首页 » 技术教程 » jQuery实现摸拟alert提示框
jQuery实现摸拟alert提示框 70 2024-03-03   

页面调用JS:

    $(document).ready(function() {
      $("#delete_without_layer").click(function () {
        $.tConfirm.open({body:'Are you sure to delete?',type:'confirm',onOk:function(){
          alert("yes");
        }});
      });
      $("#delete_with_layer").click(function () {
        $.tConfirm.open({overlay:true,body:'Are you sure to delete?',type:'confirm',onOk:function(){
          alert("yes");
        }});
      });
      $("#information").click(function () {
        $.tConfirm.open({body:'This is confirm box based on fancybox!',type:'info',onOk:function(){
          alert("yes");
        }});
      });
      $("#success").click(function () {
        $.tConfirm.open({body:'Save success!',type:'success',onOk:function(){
          alert("yes");
        }});
      });
      $("#error").click(function () {
        $.tConfirm.open({body:'Some fields are wrong!',type:'error',onOk:function(){
          alert("yes");
        }});
      });   $("#warning").click(function () {
        $.tConfirm.open({body:'Someone login, it's not real user!',type:'warning',onOk:function(){
          alert("yes");
        }});
      });
    });

查看图片

Figure 1. common confirm

查看图片

Figure 2. confirm box with layer

查看图片

Figure 3. error box

查看图片

Figure 4. success box

查看图片

Figure 5. warning box

源码下载:
https://github.com/tomlxq/jquery-confirm



!!!站长长期在线接!!!

网站、小程序:定制开发/二次开发/仿制开发等

各种疑难杂症解决/定制接口/定制采集等

站长微信:lxwl520520

站长QQ:1737366103