jQuery实现摸拟alert提示框_Javascript教程-查字典教程网
jQuery实现摸拟alert提示框
jQuery实现摸拟alert提示框
发布时间:2016-12-30 来源:查字典编辑
摘要:页面调用JS:$(document).ready(function(){$("#delete_without_layer").click(f...

页面调用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

相关阅读
推荐文章
猜你喜欢
附近的人在看
推荐阅读
拓展阅读
  • 大家都在看
  • 小编推荐
  • 猜你喜欢
  • 最新Javascript教程学习
    热门Javascript教程学习
    编程开发子分类