在同一个页面里怎么渲染出多个不同的倒计时器?

微信问答 文章 2021-11-30 18:20 418 0 全屏看文

AI助手支持GPT4.0

在同一个页面里怎么渲染出多个不同的倒计时器?How to render multiple countdown timers on the same page?

在同一个页面里怎么渲染出多个不同的倒计时器?

就是每个列表都有一个倒计时,时间都不相同,数据是从后台传过来的,渲染在页面上,页面被加载之后,他们都各自开始倒计时

Each list has a countdown, and the time is different. The data is transmitted from the background and rendered on the page. After the page is loaded, they start the countdown respectively

鍥炵瓟锛�

困难:

网上好像有吧,是不是这样?

http://www.lanrenmb.com/xiaochengxujiaocheng/8999.html

江桥月:

编程里有个重要的思想,就是不要重复造轮子。为何不转变一下思路,写一个定时器,每到一个时间点执行相应的"倒计时",定时器的终点是数值最大那个"倒计时"

谋谋谋:

自己封装个方法不香么

-EOF-

AI助手支持GPT4.0