栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > Web开发 > JavaScript

jQuery实现摸拟alert提示框

JavaScript 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

jQuery实现摸拟alert提示框

页面调用JS:

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

Figure 1. common /confirm/i

Figure 2. confirm box with layer

Figure 3. error box

Figure 4. success box

Figure 5. warning box

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

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/96836.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号