js循环遍历弹框,先弹出第一个之后逐步弹出第二个。。
var data = [{
"login_advertTitle": "即使生活琐碎,也要活得优雅",
"login_advertCont": "<html>\r\n<head>\r\n\t<title></title>\r\n</head>\r\n<body>\r\n<p style=\"padding: 10px 0px; margin: 0px; color: rgb(67, 67, 67); font-size: 16px; line-height: 2; text-indent: 2em; font-family: -apple-system, "PingFang SC", "Helvetica Neue", STHeiti, "Microsoft Yahei", Tahoma, sans-serif; background-color: rgb(255, 255, 255);\">Who can say that their lives are not insignificant?</p>\r\n\r\n<p style=\"padding: 10px 0px; margin: 0px; color: rgb(67, 67, 67); font-size: 16px; line-height: 2; text-indent: 2em; font-family: -apple-system, "PingFang SC", "Helvetica Neue", STHeiti, "Microsoft Yahei", Tahoma, sans-serif; background-color: rgb(255, 255, 255);\"> 谁的生活不琐碎呢?</p>\r\n\r\n<center style=\"padding: 0px; margin: 0px; color: rgb(51, 51, 51); font-family: -apple-system, "PingFang SC", "Helvetica Neue", STHeiti, "Microsoft Yahei", Tahoma, sans-serif; font-size: 16px; background-color: rgb(255, 255, 255);\"><img alt=\"唯美图片\" height=\"371\" src=\"https://www.yueduwen.com/uploads/allimg/1802/1-1P20320593L18.jpg\" style=\"padding: 0px; margin: 0px 0px 10px; border: none; box-shadow: rgb(174, 174, 174) 2px 3px 3px;\" width=\"600\" /></center>\r\n\r\n<p style=\"padding: 10px 0px; margin: 0px; color: rgb(67, 67, 67); font-size: 16px; line-height: 2; text-indent: 2em; font-family: -apple-system, "PingFang SC", "Helvetica Neue", STHeiti, "Microsoft Yahei", Tahoma, sans-serif; background-color: rgb(255, 255, 255);\"> Everyone's life is composed with one after another insignificant day.</p>\r\n\r\n<p style=\"padding: 10px 0px; margin: 0px; color: rgb(67, 67, 67); font-size: 16px; line-height: 2; text-indent: 2em; font-family: -apple-system, "PingFang SC", "Helvetica Neue", STHeiti, "Microsoft Yahei", Tahoma, sans-serif; background-color: rgb(255, 255, 255);\"> 我们的一生,都是由这一个个琐碎的一天构成的。</p>\r\n\r\n<p style=\"padding: 10px 0px; margin: 0px; color: rgb(67, 67, 67); font-size: 16px; line-height: 2; text-indent: 2em; font-family: -apple-system, "PingFang SC", "Helvetica Neue", STHeiti, "Microsoft Yahei", Tahoma, sans-serif; background-color: rgb(255, 255, 255);\"> Some people got their willpower abraded in this endless loop of days.</p>\r\n\r\n<p style=\"padding: 10px 0px; margin: 0px; color: rgb(67, 67, 67); font-size: 16px; line-height: 2; text-indent: 2em; font-family: -apple-system, "PingFang SC", "Helvetica Neue", STHeiti, "Microsoft Yahei", Tahoma, sans-serif; background-color: rgb(255, 255, 255);\"> 有的人在这日复一日的循环中被消磨了意志。</p>\r\n\r\n<p style=\"padding: 10px 0px; margin: 0px; color: rgb(67, 67, 67); font-size: 16px; line-height: 2; text-indent: 2em; font-family: -apple-system, "PingFang SC", "Helvetica Neue", STHeiti, "Microsoft Yahei", Tahoma, sans-serif; background-color: rgb(255, 255, 255);\"> They think this is how things can only be like.<span class=\"yueduwencom\" style=\"padding: 0px; margin: -30px 0px 0px; position: relative; top: -5000px; left: -10000px; display: block;\">(<a href=\"http://www.yueduwen.com/\" style=\"padding: 0px; margin: 0px; color: rgb(0, 112, 192);\">悦读文网</a> www.yueduwen.com)</span></p>\r\n\r\n<p style=\"padding: 10px 0px; margin: 0px; color: rgb(67, 67, 67); font-size: 16px; line-height: 2; text-indent: 2em; font-family: -apple-system, "PingFang SC", "Helvetica Neue", STHeiti, "Microsoft Yahei", Tahoma, sans-serif; background-color: rgb(255, 255, 255);\"> 认为一切也就这样了。</p>\r\n\r\n<p style=\"padding: 10px 0px; margin: 0px; color: rgb(67, 67, 67); font-size: 16px; line-height: 2; text-indent: 2em; font-family: -apple-system, "PingFang SC", "Helvetica Neue", STHeiti, "Microsoft Yahei", Tahoma, sans-serif; background-color: rgb(255, 255, 255);\"> So they choose to reach a compromise and become mediocre. They become the background colors in others' eyes. They won't achieve anything great to be written down in history, nor can they bring any enjoyment to the people around them.</p>\r\n\r\n<p style=\"padding: 10px 0px; margin: 0px; color: rgb(67, 67, 67); font-size: 16px; line-height: 2; text-indent: 2em; font-family: -apple-system, "PingFang SC", "Helvetica Neue", STHeiti, "Microsoft Yahei", Tahoma, sans-serif; background-color: rgb(255, 255, 255);\"> 于是他们选择与平庸妥协,成为别人眼中的背景颜色,不光不会在历史上留下一笔伟绩,甚至无法为身边的人平添一抹色彩。</p>\r\n\r\n<p style=\"padding: 10px 0px; margin: 0px; color: rgb(67, 67, 67); font-size: 16px; line-height: 2; text-indent: 2em; font-family: -apple-system, "PingFang SC", "Helvetica Neue", STHeiti, "Microsoft Yahei", Tahoma, sans-serif; background-color: rgb(255, 255, 255);\"> They are alive, but deep down in their hearts something important has died.</p>\r\n\r\n<p style=\"padding: 10px 0px; margin: 0px; color: rgb(67, 67, 67); font-size: 16px; line-height: 2; text-indent: 2em; font-family: -apple-system, "PingFang SC", "Helvetica Neue", STHeiti, "Microsoft Yahei", Tahoma, sans-serif; background-color: rgb(255, 255, 255);\"> 他们活着,但他们心中的一部分已经死了。</p>\r\n\r\n<p style=\"padding: 10px 0px; margin: 0px; color: rgb(67, 67, 67); font-size: 16px; line-height: 2; text-indent: 2em; font-family: -apple-system, "PingFang SC", "Helvetica Neue", STHeiti, "Microsoft Yahei", Tahoma, sans-serif; background-color: rgb(255, 255, 255);\"> And there are another kind of people. They choose to live with dignity.</p>\r\n\r\n<p style=\"padding: 10px 0px; margin: 0px; color: rgb(67, 67, 67); font-size: 16px; line-height: 2; text-indent: 2em; font-family: -apple-system, "PingFang SC", "Helvetica Neue", STHeiti, "Microsoft Yahei", Tahoma, sans-serif; background-color: rgb(255, 255, 255);\"> 而另一些人,他们依旧选择有尊严地活着。</p>\r\n\r\n<p style=\"padding: 10px 0px; margin: 0px; color: rgb(67, 67, 67); font-size: 16px; line-height: 2; text-indent: 2em; font-family: -apple-system, "PingFang SC", "Helvetica Neue", STHeiti, "Microsoft Yahei", Tahoma, sans-serif; background-color: rgb(255, 255, 255);\"> A graceful lifestyle is not a show for others to watch. You live it because you deserve it. Through it, you are avoiding to become a victim of this cruel world.</p>\r\n\r\n<p style=\"padding: 10px 0px; margin: 0px; color: rgb(67, 67, 67); font-size: 16px; line-height: 2; text-indent: 2em; font-family: -apple-system, "PingFang SC", "Helvetica Neue", STHeiti, "Microsoft Yahei", Tahoma, sans-serif; background-color: rgb(255, 255, 255);\"> 优雅的生活方式并不是为别人做的表演,而是为了对得起自己,让自己不会成为无情社会摧残下的牺牲品。</p>\r\n\r\n<p style=\"padding: 10px 0px; margin: 0px; color: rgb(67, 67, 67); font-size: 16px; line-height: 2; text-indent: 2em; font-family: -apple-system, "PingFang SC", "Helvetica Neue", STHeiti, "Microsoft Yahei", Tahoma, sans-serif; background-color: rgb(255, 255, 255);\"> This kind of people know how to find joy in simple things. They know how to make a common day safisticated and meaningful.</p>\r\n\r\n<center style=\"padding: 0px; margin: 0px; color: rgb(51, 51, 51); font-family: -apple-system, "PingFang SC", "Helvetica Neue", STHeiti, "Microsoft Yahei", Tahoma, sans-serif; font-size: 16px; background-color: rgb(255, 255, 255);\"><img alt=\"唯美图片\" height=\"371\" src=\"https://www.yueduwen.com/uploads/allimg/1802/1-1P2032100022V.jpg\" style=\"padding: 0px; margin: 0px 0px 10px; border: none; box-shadow: rgb(174, 174, 174) 2px 3px 3px;\" width=\"600\" /></center>\r\n\r\n<p style=\"padding: 10px 0px; margin: 0px; color: rgb(67, 67, 67); font-size: 16px; line-height: 2; text-indent: 2em; font-family: -apple-system, "PingFang SC", "Helvetica Neue", STHeiti, "Microsoft Yahei", Tahoma, sans-serif; background-color: rgb(255, 255, 255);\"> 他们懂得如何去发掘单纯事物中的喜悦,懂得如何将平凡的时光过得精致而充实。</p>\r\n\r\n<p style=\"padding: 10px 0px; margin: 0px; color: rgb(67, 67, 67); font-size: 16px; line-height: 2; text-indent: 2em; font-family: -apple-system, "PingFang SC", "Helvetica Neue", STHeiti, "Microsoft Yahei", Tahoma, sans-serif; background-color: rgb(255, 255, 255);\"> Life has denied them some beauty. But they build them with their own hands.</p>\r\n\r\n<p style=\"padding: 10px 0px; margin: 0px; color: rgb(67, 67, 67); font-size: 16px; line-height: 2; text-indent: 2em; font-family: -apple-system, "PingFang SC", "Helvetica Neue", STHeiti, "Microsoft Yahei", Tahoma, sans-serif; background-color: rgb(255, 255, 255);\"> 那份生活中缺失的美丽,他们靠自己的双手创造了出来。</p>\r\n\r\n<p style=\"padding: 10px 0px; margin: 0px; color: rgb(67, 67, 67); font-size: 16px; line-height: 2; text-indent: 2em; font-family: -apple-system, "PingFang SC", "Helvetica Neue", STHeiti, "Microsoft Yahei", Tahoma, sans-serif; background-color: rgb(255, 255, 255);\"> So which kind of these two are you? And which kind are you willing to be?</p>\r\n\r\n<p style=\"padding: 10px 0px; margin: 0px; color: rgb(67, 67, 67); font-size: 16px; line-height: 2; text-indent: 2em; font-family: -apple-system, "PingFang SC", "Helvetica Neue", STHeiti, "Microsoft Yahei", Tahoma, sans-serif; background-color: rgb(255, 255, 255);\"> 你的人生是哪种?你想过哪一种?</p>\r\n\r\n<p style=\"padding: 10px 0px; margin: 0px; color: rgb(67, 67, 67); font-size: 16px; line-height: 2; text-indent: 2em; font-family: -apple-system, "PingFang SC", "Helvetica Neue", STHeiti, "Microsoft Yahei", Tahoma, sans-serif; background-color: rgb(255, 255, 255);\"> Have you find the answer?</p>\r\n\r\n<p style=\"padding: 10px 0px; margin: 0px; color: rgb(67, 67, 67); font-size: 16px; line-height: 2; text-indent: 2em; font-family: -apple-system, "PingFang SC", "Helvetica Neue", STHeiti, "Microsoft Yahei", Tahoma, sans-serif; background-color: rgb(255, 255, 255);\"> 你找到答案了吗?</p>\r\n</body>\r\n</html>\r\n",
"login_advertTime": "15000",
"login_adverClose": "1"
}, {
"login_advertTitle": "aaaaaaa",
"login_advertCont": "<html>\r\n<head>\r\n\t<title></title>\r\n</head>\r\n<body>asdasdasassdas d<br />\r\n<img alt=\"\" src=\"/jeecg/upload//1534303323463.jpg\" style=\"width: 250px; height: 275px;\" /><br />\r\n99999999999999</body>\r\n</html>\r\n",
"login_advertTime": "15000",
"login_adverClose": "1"
}];
var i = 0;
// 添加计时器
var time = setInterval(function () {
if (i >= data.length) {
clearInterval(time);
} else {
OpenAdvert(data[i].login_advertTitle, data[i].login_advertCont, data[i].login_advertTime, data[i].login_adverClose);
i++;
}
}, 5000);
//弹出广告信息
function OpenAdvert(title, con, time, close) {
layer.open({
type: 1,
title: title,
fix: false,
shadeClose: true,
offset: 'rb',
anim: 2,
maxmin: true,
area: ['1000px', '500px'],
content: con,
shade: 0,
shadeClose: true,
time: time,
cancel: function (index, layero) {
// 判断是否强制关闭
if (close == 1) {
return true;
} else if (close == 0) {
return false;
}
}
});
}
js循环遍历弹框,先弹出第一个之后逐步弹出第二个。。的更多相关文章
- html实现弹框,并伴随遮罩层,且弹框居中
本文介绍的内容主要实现的功能有,出现弹框,并且伴随遮罩层,且弹框一直居中. html和js代码: <div id="hidebg"></div> <d ...
- JS 循环遍历JSON数据 分类: JS技术 JS JQuery 2010-12-01 13:56 43646人阅读 评论(5) 收藏 举报 jsonc JSON数据如:{"options":"[{
JS 循环遍历JSON数据 分类: JS技术 JS JQuery2010-12-01 13:56 43646人阅读 评论(5) 收藏 举报 jsonc JSON数据如:{"options&q ...
- 如何在EXCEL中找出第一列中不包含的第二列数据
1.找出第一列中不包含的第二列数据:=IFERROR(VLOOKUP(A:A,B:B,1,0),"无") 2.A列相同,B列相加:=SUMIF(G:G,G1,J:J)
- vue组件,vue补充和总结,JS循环遍历和加减运算、类型转换补充
目录 一.vue中的组件 1. 组件的概念 2. 组件分类 3. 组件的特点 4. 组件的定义 5. 组件化 (1)用法和注意 (2)数据组件化实例 6. 组件传参--父传子 (1)用法和注意 (2) ...
- js循环遍历的两种方法for循环和for ... in 循环
JS数组的遍历方法有两种: 第一种:一般的for循环,例如: var a = new Array("first", "second", "third& ...
- JS 循环遍历 总结
一.循环遍历语句 for...in... (ES5) 语法:javascript for(keys in obj){} 适用:遍历对象 说明: 1.keys表示obj对象的每一个键值对的键(键名),所 ...
- js循环遍历数组
一维数组的遍历 <script> //循环遍历数组 var animals = ["cat",'dog','human','whale','seal']; var an ...
- js循环遍历数组(对象)
1,for循环 对于循环应该是最常用的一种遍历方式了,通常用来遍历数组结构. let arr = [a,b,d];for (let i=0; i<arr.length; i++){ consol ...
- JS 循环遍历JSON数据
JSON数据如:{"options":"[{/"text/":/"王家湾/",/"value/":/" ...
随机推荐
- CSS表格(未完成)
CSS 表格 使用 CSS 可以使 HTML 表格更美观. 表格边框 指定CSS表格边框,使用border属性. 下面的例子指定了一个表格的Th和TD元素的黑色边框:
- 在vue init webpack my-project卡住的问题
在安装完node.js后,也用cnpm代替了npm,然后使用cnpm在node.js的安装路径下安装了vue-cli:cnpm install --global vue-cli.然后使用vue ini ...
- 微信小程序----团购或秒杀的批量倒计时实现
效果图 实现思路微信小程序实现倒计时,可以将倒计时的时间进行每一秒的计算和渲染! JS模拟商品列表数据 goodsList:在 onLoad 周期函数中对活动结束时间进行提取:建立时间格式化函数 ti ...
- [LeetCode] 496. Next Greater Element I_Easy tag: Stack
You are given two arrays (without duplicates) nums1 and nums2 where nums1’s elements are subset of n ...
- 机器学习理论基础学习3.3--- Linear classification 线性分类之logistic regression(基于经验风险最小化)
一.逻辑回归是什么? 1.逻辑回归 逻辑回归假设数据服从伯努利分布,通过极大化似然函数的方法,运用梯度下降来求解参数,来达到将数据二分类的目的. logistic回归也称为逻辑回归,与线性回归这样输出 ...
- python 的 json 转换
python 的 json 转换 本文为原创文章,禁止转载! 本文以 json.dumps() 和 json.loads() 方法进行 Python 数据和 json 格式之间转换,进行讲解 首先比 ...
- testng入门教程15数据驱动
testng在类 里面的数据驱动 package driver_test; import org.testng.annotations.DataProvider; import org.testng. ...
- The Air Jordan 11 Gym Red will be available December 9
A few years ago Carmelo Anthony set the internet on fire when he was spotted rocking a never before ...
- Microsoft Interview第一轮
上来随意交谈了一小会儿,开了点小玩笑,chat了一些关于他们recruter行程的话题,缓和了一下气氛. 进入正题,问了做的research的方向,我说是DLT,然后大概给他讲解了一下具体是什么, 跟 ...
- C# 拼接字符串的几种方式和性能
开发过程中常用到的拼接字符串的方法有三种: 1 简单 “+=” 拼接法 1 2 3 4 5 string str="a"; str+="c"+"d ...