代码
var countdown=60;
function changeflag(){
countdown=60;
}
function sendYZM(e){
//d调用发送短信接口
//
var val="发送验证码";
if (countdown == 0) {
$(e).attr("onclick", "sendYZM(this);changeflag();");
val="重新发送验证码";
clearTimeout(t);
} else {
$(e).attr("onclick", "null");
val="重新发送(" + countdown + ")";
countdown--;
};
$("#TANGRAM__PSP_3__verifyCodeResend").text(val);
t=setTimeout(function() {
sendYZM(e);
},1000);
}
jsp代码:
<span id="TANGRAM__PSP_3__verifyCodeResend" class="pass-captcha-resend" onclick="sendYZM(this);changeflag();">发送验证码</span>
219

被折叠的 条评论
为什么被折叠?



