easyUI实现(alert)提示框自动关闭的实例代码
作者:jingxian 发布时间:2024-04-22 22:43:31
标签:easyui,alert,关闭
原理:使用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');
}
};
}
0
投稿
猜你喜欢
- 一、单循环动态设置ref1.设置:【:ref=“‘XXX’ + index&am
- 在实际生活中,经常会有文件重复的困扰,即同一个文件可能既在A目录中,又在B目录中,更可恶的是,即便是同一个文件,文件名可能还不一样。在文件较
- 1、MFCC概述在语音识别(Speech Recognition)和话者识别(Speaker Recognition)方面,最常用到的语音特
- Prometheus是什么Prometheus是一套开源监控系统和告警为一体,由go语言(golang)开发,是监控+报警+时间序列数据库的
- 查看python搜索包的路径的实现方法:python搜索包的路径存储在sys.path下查看方法:import syssys.path临时添
- 一 过滤器写法{{ message | Filter}}二 Vue自带的过滤器:capitalize功能:首字母大写<!DOCTYPE
- 假如你拥有一个庞大的网站,内容又多,那么来访者往往很难找到自己所需要的东东,这时候你就需要一个站内搜索来帮助来访者更快的找到索要的资料了!现
- 前言在Vue3响应式对象是如何实现的(1)中,我们已经从功能上实现了一个响应式对象。如果仅仅满足于功能实现,我们就可以止步于此了。但在上篇中
- 自从python2.2提供了yield关键字之后,python的生成器的很大一部分用途就是可以用来构建协同程序,能够将函数挂起返回中间值并能
- Exec 包我们可以使用官方的 os/exec 包来运行外部命令。当我们执行 shell 命令时,我们是在 G
- Exec 是 os 包中的一个子包,它可用于使用 Go 运行外部命令。Go exec 命令教程展示了如何在 Golang 中执行 shell
- 许多网页开发者想从ASP.NET 页面传递一个值到另一个页面(比如从一个框架frame页面到一个弹窗页面)。看了代码就明白了。呵呵。(一)向
- 不得不说python的上手非常简单。在网上找了一下,大都是python2的帖子,于是随手写了个python3的。代码非常简单就不解释了,直接
- 需要准备的环境:一个B站账号,需要先登录,否则不能查看历史弹幕记录联网的电脑和顺手的浏览器,我用的ChromePython3环境以及requ
- 一、配置抓包工具1.安装软件本文选择的抓包工具:Fiddler 具体的下载安装这里不详细赘述!(网上搜Fiddler安
- 平时在PL/SQL中的编程中遇到一些问题,这里以问答的形式来进行把它们总结下来,以供大家分享。1、当需要向表中装载大量的数据流或者需要处理大
- 在介绍ensure内部的实现之前,让我们先来看看其功能: ensure({ html: "popup.html", ja
- 在NLP中,数据清洗与分词往往是很多工作开始的第一步,大多数工作中只有中文语料数据需要进行分词,现有的分词工具也已经有了很多了,这里就不再多
- 转:coolcode.cn前几天写了一篇在任意字符集下正常显示网页的方法,里面介绍的很简单,就是把前128个字符以外的字符集都用
- 这个是JS控制图片滚动的效果,当鼠标结果新闻标题时开始滚动到对应的图片,可以作为图片新闻。效果图:<!DOCTYPE HTML PUB