HTML:简单实现短信验证码的按钮界面显示
如意编程网
收集整理的这篇文章主要介绍了
HTML:简单实现短信验证码的按钮界面显示
小编觉得挺不错的,现在分享给大家,帮大家做个参考.
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body>
<script type="text/javascript">
var countdown=60;
function settime(obj) {
if (countdown == 0) {
obj.removeAttribute("disabled");
obj.value="免费获取验证码";
countdown = 60;
return;
} else {
obj.setAttribute("disabled", true);
obj.value="重新发送(" + countdown + "s)";
countdown--;
}
setTimeout(function() {
settime(obj) }
,1000)
}
</script>
<input />
<input type="button" />
</body>
</html>
总结
以上是如意编程网为你收集整理的HTML:简单实现短信验证码的按钮界面显示的全部内容,希望文章能够帮你解决所遇到的问题。
- 上一篇: 基于 HTML5 的人脸识别技术
- 下一篇: Windows XP下恢复html,mh