artDialog 弹窗提示

Posted 统哥

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了artDialog 弹窗提示相关的知识,希望对你有一定的参考价值。

artDialog 弹窗提示,方便调用,不用去查文档了。

技术分享
 1 /// <reference path="../../Scripts/artDialog5.0/artDialog.min.js" />
 2 
 3 ;(function (win) {
 4     var artIco = { success: "succeed", sad: "face-sad", error: "error", warning: "warning" };
 5     var artDiv = {
 6         loading:LodingDiv,
 7         ico: artIco,
 8         alertConfirm:function (msg,okFun,cancelFun){
 9             AlertConfirm(msg,okFun,cancelFun);
10         },
11         alterMessage: function (vImg, vMes, time) {
12             if (arguments.length == 2) {
13                 AlertMessage(vImg, vMes);
14             }else if(arguments.length == 3){
15                AlertMessage(vImg, vMes,time);
16             }
17         }
18     };
19     
20     function LodingDiv(){
21             var d = art.dialog({
22                 title: 提示,
23                 content: "<img src=\"/Scripts/artDialog5.0/skins/loading.gif\" />",
24                 lock: true,
25                 opacity: 0.7,
26                 esc: false,
27                 cancel: false
28             });
29             return d;
30     }
31 
32     function AlertConfirm(msg,okFun,cancelFun){
33            art.dialog({
34                 title: 提示,
35                 content: msg,
36                 lock: true,
37                 opacity: 0.7,
38                 esc: false,
39                 cancel: false,
40                 ok:okFun,
41                 cancel:cancelFun,
42                 okValue: 确定,
43                 cancelValue: 取消
44             });
45     }
46 
47     function AlertMessage(vImg, vMes) {
48         art.dialog({
49             title: 信息提示,
50             content: <table width=\‘100%\‘><tr><td><img src="/../../Scripts/artDialog5.0/skins/icons/ + vImg + .png"/> </td><td> + vMes + </td></tr></table>,
51             width: 350px,
52             height: 120px,
53             opacity: 0.7,
54             okValue: 关 闭,
55             lock: true,
56             ok: function () {
57 
58             }
59         });
60     }
61 
62     function AlertMessage(vImg, vMes, time) {
63         art.dialog({
64             title: 信息提示,
65             content: <table width=\‘100%\‘><tr><td><img src="/../../Scripts/artDialog5.0/skins/icons/ + vImg + .png"/> </td><td> + vMes + </td></tr></table>,
66             width: 350px,
67             height: 120px,
68             opacity: 0.7,
69             okValue: 关 闭,
70             lock: true,
71             time: time,
72             ok: function () {
73 
74             }
75         });
76     }
77 
78     win.$artDiv = artDiv;
79 })(window);
View Code

 

以上是关于artDialog 弹窗提示的主要内容,如果未能解决你的问题,请参考以下文章

art dialog 弹窗怎么在js里面关闭?

小程序各种功能代码片段整理---持续更新

ArtDialog V6的简单使用

js到一定时间进行弹窗提示,确定到分

artDialog基本使用

artdialog(4.1.7)弹出框