您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

js实现短信验证码读秒功能

2025/11/29 22:42:42发布47次查看
本文主要和大家分享js实现短信验证码读秒功能,希望能帮助到大家。
js部分
<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 + ")"; countdown--; } settimeout(function() { settime(obj) } ,1000); } function dd(){ var obj = document.getelementbyid("test1"); obj.innerhtml=""; var nullop = document.createelement("option"); nullop.setattribute("value", ""); nullop.appendchild(document.createtextnode("请选择")); obj.appendchild(nullop); for ( var int = 0; int < 1; int++) { var op = document.createelement("option"); op.setattribute("value", "123"); op.appendchild(document.createtextnode("123")); obj.appendchild(op); } }); </script> html部分 <input type="button" id="btn" value="免费获取验证码" onclick="settime(this)" /> <input type="text" id="dd" onclick="dd()" value="sdf" />
相关推荐:
怎么用php实现短信验证码发送、
js实现短信验证码
js实现用户注册时获取短信验证码和倒计时功能的示例代码分享
以上就是js实现短信验证码读秒功能的详细内容。
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product