How to use 'settime in javascript' in JavaScript

Every line of 'settime in javascript' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your JavaScript code is secure.

All examples are scanned by Snyk Code

By copying the Snyk Code Snippets you agree to
this disclaimer
168function settime(obj) {
169 countdown=getCookieValue("secondsremained");
170 if (countdown == 0) {
171 obj.removeAttr("disabled");
172 obj.val("免费获取验证码");
173 return;
174 } else {
175 obj.attr("disabled", true);
176 obj.val("重新发送(" + countdown + ")");
177 countdown--;
178 editCookie("secondsremained",countdown,countdown+1);
179 }
180 setTimeout(function() { settime(obj) },1000) //每1000毫秒执行一次
181}
Important

Use secure code every time

Secure your code as it's written. Use Snyk Code to scan source code in minutes – no build needed – and fix issues immediately. Enable Snyk Code


Related snippets