发送手机短信验证码php代码,在点击获取验证码时没有任何反应,求帮助!
<divclass="weui_cellsweui_cells_form"><divclass="weui_cellweui_vcode"><divclass="weui...
<div class="weui_cells weui_cells_form">
<div class="weui_cell weui_vcode">
<div class="weui_cell_hd"><label for="" class="weui_label">手机</label></div>
<div class="weui_cell_bd weui_cell_primary">
<input class="weui_input" type="number" placeholder="必填" id="mobile">
</div>
<div class="weui_cell_ft" style="font-size:16px;border-left:1px solid #D9D9D9">
<div style="text-align:center;width:90px;height:44px;line-height:44px;margin-left:5px;background:" onclick="sendCaptcha(this)">获取验证码</div>
</div>
</div>
<div class="weui_cell weui_cell_warn">
<div class="weui_cell_hd"><label for="" class="weui_label">验证码</label></div>
<script type="text/javascript">
var sendCaptchaKey = true;
var startTime = 60;
function sendCaptcha(obj) {
if(!sendCaptchaKey) {
return false;
}
var mobile = $("#mobile").val();
if(mobile.length != 11) {
alert("请输入正确的手机号");
return;
}
// 关闭触发开关
sendCaptchaKey = false;
// 发送验证码 展开
<div class="weui_cell weui_vcode">
<div class="weui_cell_hd"><label for="" class="weui_label">手机</label></div>
<div class="weui_cell_bd weui_cell_primary">
<input class="weui_input" type="number" placeholder="必填" id="mobile">
</div>
<div class="weui_cell_ft" style="font-size:16px;border-left:1px solid #D9D9D9">
<div style="text-align:center;width:90px;height:44px;line-height:44px;margin-left:5px;background:" onclick="sendCaptcha(this)">获取验证码</div>
</div>
</div>
<div class="weui_cell weui_cell_warn">
<div class="weui_cell_hd"><label for="" class="weui_label">验证码</label></div>
<script type="text/javascript">
var sendCaptchaKey = true;
var startTime = 60;
function sendCaptcha(obj) {
if(!sendCaptchaKey) {
return false;
}
var mobile = $("#mobile").val();
if(mobile.length != 11) {
alert("请输入正确的手机号");
return;
}
// 关闭触发开关
sendCaptchaKey = false;
// 发送验证码 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询