作者 潘浩文
1 个管道 的构建 通过 耗费 0 秒

1

... ... @@ -175,6 +175,12 @@
//启动计时器,1秒执行一次
$(".getcode").click(function(){
var mobile=$("#mobile").val();
var phoneReg = /(^1[3|4|5|7|8]\d{9}$)|(^09\d{8}$)/;
//电话
if (!phoneReg.test(mobile)) {
alert('请输入有效的手机号码!');
return false;
}
curCount = count;
//设置button效果,开始计时
$(".getcode").attr("disabled",true);
... ... @@ -187,7 +193,6 @@
type: "post",
data: {
mobile:mobile,
code:code,
},
success: function (data) {
alert(data)
... ...