js倒计时实现(简单)

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/m0_37355951/article/details/79762247

倒计时自动刷新功能

html标签:

<div id="refresh"
		style="z-index: 9999; position: absolute; color: red; font-weight: bold">10</div>

js:(10-->1)

var i = 10
setInterval(function () {
	if(i==0){
	   i=10;
	}
	$('#refresh').html(i--);
}, 1000);

猜你喜欢

转载自blog.csdn.net/m0_37355951/article/details/79762247