Welcome 微信登录
编程资源 图片资源库 蚂蚁家优选 PDF转换器 软件资源

软件开发小程序制作系统集成与运维空间租用硬件开发视频监控技术咨询与支持——联系电话:0311-88999002/88999003

首页 / 脚本样式 / JavaScript / jQuery实现摸拟alert提示框

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