PHP multitasking countdown help
终
南
山
下
求
真
经
终 南 山 下 求 真 经 2021-04-14 22:12:24
0
2
1127

I am a novice. I have been working on a post list countdown function recently. I suffer from my lack of talent and lack of skills, so the countdown has not been able to work well. I forgot to give you some advice!

Get back to the topic

I want to get the time when the post was published to start the countdown, countdown End Close Show Post!

Because it is multi-tasking, only one of the referenced countdown codes can take effect, or the countdown can be refreshed and the countdown starts again, which is very distressing! I hope you guys can give me some advice!

终
南
山
下
求
真
经
终 南 山 下 求 真 经

reply all(1)
欧阳

Will the countdown be done? This is the countdown of js.

Use php to calculate the remaining seconds. The current time - the publishing timestamp is the remaining seconds. . Then give the remaining seconds to the regcountdown variable

var regcountdown=30;regSendCode= $("#regSendCode");			settime(regSendCode);		function settime(regSendCode) {			//发送验证码倒计时			if(regcountdown == 0){				regSendCode.removeClass('disabled');				regSendCode.attr('onclick','sendemail()');				regSendCode.html("获取验证码");				regcountdown = 30;				return;			}else{				regSendCode.addClass('disabled');				regSendCode.removeAttr('onclick');				regSendCode.html("重新发送("+regcountdown+")");				regcountdown--;			}			setTimeout(function(){				settime(regSendCode);			},1000);		}
  • reply I used this countdown when registering, because I don’t know your code and can’t tell you directly. . You saw it yourself, change this js code.
    查无此人 author 2021-04-15 13:37:39
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template