码迷,mamicode.com
首页 > 其他好文 > 详细

easyUI实现(alert)提示框自动关闭的实例代码

时间:2017-02-02 13:10:08      阅读:219      评论:0      收藏:0      [点我收藏+]

标签:interval   dex   int   参考   word   keyword   key   plain   set   

function alert_autoClose(title,msg,icon){
 var interval;
 var time=1000;
 var x=2;  //设置时间2s
$.messager.alert(title,msg,icon,function(){});
 interval=setInterval(fun,time);
    function fun(){
   --x;
   if(x==0){
     clearInterval(interval);
 $(".messager-body").window(‘close‘); 
    }
};
}
 
easyui messager alert 的参数可以参考
http://xiaoyaocao.iteye.com/blog/1880245
 

easyUI实现(alert)提示框自动关闭的实例代码

标签:interval   dex   int   参考   word   keyword   key   plain   set   

原文地址:http://www.cnblogs.com/sjqq/p/6361074.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!