easyUI实现(alert)提示框自动关闭的实例代码
作者:jingxian 时间:2024-04-22 22:43:31
原理:使用js的定时任务函数setInterval设置时间,然后触发关闭事件
参数说明
title:提示框的标题
msg:提示信息内容
ico:显示的提示信息图标,'info','warnning','error'等
函数体
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,alert,关闭
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
一步步教你编写可测试的Go语言代码
2024-04-29 13:03:43
Go Redis客户端使用的两种对比
2024-05-09 09:31:15
![](https://img.aspxhome.com/file/2023/2/127432_0s.png)
Python常用编译器原理及特点解析
2021-09-04 05:10:11
python导出chrome书签到markdown文件的实例代码
2022-08-26 00:49:36
asp如何获知页面上的图象的实际尺寸?
2009-11-24 20:50:00
微信小程序 swiper 组件遇到的问题及解决方法
2024-04-18 09:40:47
Python进阶篇之字典操作总结
2021-08-02 20:34:44
谈谈从phpinfo中能获取哪些值得注意的信息
2023-11-23 23:52:17
![](https://img.aspxhome.com/file/2023/0/111040_0s.png)
Selenium鼠标与键盘事件常用操作方法示例
2023-04-23 12:39:26
![](https://img.aspxhome.com/file/2023/3/134633_0s.png)
5款最强且免费的Python IDE小结
2022-12-07 05:25:19
![](https://img.aspxhome.com/file/2023/6/127116_0s.png)
Python入门之列表用法详解
2023-10-04 05:44:50
![](https://img.aspxhome.com/file/2023/0/117470_0s.png)
python tqdm库的使用
2023-10-30 22:32:44
![](https://img.aspxhome.com/file/2023/9/131009_0s.png)
Keras使用ImageNet上预训练的模型方式
2021-03-01 10:08:51
![](https://img.aspxhome.com/file/2023/0/81840_0s.jpg)
用 XSLT 把 XML 数据生成柱状图
2009-05-19 12:46:00
利用numpy+matplotlib绘图的基本操作教程
2021-01-26 11:14:31
![](https://img.aspxhome.com/file/2023/8/133778_0s.png)
sqlserver附加.mdf权限问题解决
2024-01-17 15:46:20
解决pyCharm中 module 调用失败的问题
2022-11-27 23:21:19
![](https://img.aspxhome.com/file/2023/7/82617_0s.jpg)
Python 相对路径报错:"No such file or directory"'原因及解决方法
2021-08-12 05:34:00
![](https://img.aspxhome.com/file/2023/5/66865_0s.png)
django admin后管定制-显示字段的实例
2023-07-01 11:34:18
![](https://img.aspxhome.com/file/2023/6/97146_0s.jpg)
Maui Blazor 使用摄像头实现代码
2023-12-06 11:44:37