<script type="text/javascript" src="http://xds.offcn.com/statics/js/wap2019/jquery-1.8.3.min.js"></script>
<script> $("#dosubmit").click(function() { var formid = $('#getyzm').attr("data"); var name = $("#name").val(); var phone = $("#tel").val(); // var area = $("#area option:selected").val(); var yzm = $("#yzm").val(); var name_re = /^[\u4e00-\u9fa5]{0,}$/; var phone_re = /^1[34578]\d{9}$/; if(!name) { alert('请输入姓名'); return false; } if(!name_re.test(name)) { alert('请输入汉字'); return false; } if(!phone) { alert('请输入手机号'); return false; } if(!phone_re.test(phone)) { alert('请输入正确手机号'); return false; } /* if(!area) { alert('请输入地市'); return false; }*/ if(!yzm) { alert('请输入验证码'); return false; } $.ajax({ url: 'http://zg99.offcn.com/index/biaodan/register?actid='+formid+'&callback=?', type: 'GET', dataType: 'jsonp', data: {name: name, phone: phone,yzm:yzm}, success: function(data) { if (data.status=="1") { for(i=0;i点击领取:'+name+''
console.log(str);
$(".down_btn").html('')
$(".down_btn").append(str)
}
$(".offcn_qhtc").show()
} else {
//alert(data.msg);
alert(data.msg);
}
}
})
return false;
});
$('#getyzm').click(function() {
getVerifyCode();
});
$(".qhtcclose").click(function(){
$(".offcn_qhtc").hide()
});
function getVerifyCode() {
var formid = $('#getyzm').attr("data")
var daojishi = $('#getyzm').attr("daojishi")
var phone = $('#tel').val();
var phone_re = /^1[34578]\d{9}$/;
if(phone == '') { //验证手机号是否为空
alert('请填写手机号');
return false;
}
if(!phone_re.test(phone)) {
alert('请输入正确手机号');
return false;
}
$('#getyzm').hide();
$('#daojishi').show();
$.ajax({
url: 'http://zg99.offcn.com/index/biaodan/sendmsg?actid='+formid+'&callback=?',
type: 'GET',
dataType: 'jsonp',
data: {phone: phone},
success: function(data) {
if (data.status=="1") {
alert('正在发送请稍后...');
var sec = daojishi;
$("#getyzm").text('获取验证码');
runcount(sec)
} else {
//alert(data.msg);
alert(data.msg);
}
}
});
}
function runcount(t) {
if(t > 0) {
document.getElementById('daojishi').innerHTML = t + 'S后重新获取';
t--;
setTimeout(function() {
runcount(t)
}, 1000)
} else {
$('#getyzm').show();
$('#daojishi').hide();
}
}
</script>
双12资料免费领
模拟卷一套
申论五大专项模块详解
青春备考手册
选调双12、过一个不吃土的购物节
提取码: 4fth
填写信息领取双十二活动-备考资料包
<script> $("#dosubmit").click(function() { var formid = $('#getyzm').attr("data"); var name = $("#name").val(); var phone = $("#tel").val(); // var area = $("#area option:selected").val(); var yzm = $("#yzm").val(); var name_re = /^[\u4e00-\u9fa5]{0,}$/; var phone_re = /^1[34578]\d{9}$/; if(!name) { alert('请输入姓名'); return false; } if(!name_re.test(name)) { alert('请输入汉字'); return false; } if(!phone) { alert('请输入手机号'); return false; } if(!phone_re.test(phone)) { alert('请输入正确手机号'); return false; } /* if(!area) { alert('请输入地市'); return false; }*/ if(!yzm) { alert('请输入验证码'); return false; } $.ajax({ url: 'http://zg99.offcn.com/index/biaodan/register?actid='+formid+'&callback=?', type: 'GET', dataType: 'jsonp', data: {name: name, phone: phone,yzm:yzm}, success: function(data) { if (data.status=="1") { for(i=0;i