皮具定制ODM
皮具礼品
var PTN_EMAIL2 = /\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*/;
var reg = /^\s*$/;
function resetinputtwo2() {
var txtemail2 = $("#txtemail2");
txtemail2.val("输入邮箱,索要资料");
}
function AddLeavewordtwo2(src) {
var txtemail2 = $v("txtemail2");
var err = "";
if (reg.test(txtemail2) || txtemail2 == "" || txtemail2 == "输入邮箱,索要资料") {
err += "<li style=\"height:18px\">请输入您的邮箱,索要相关资料</li>";
} else if (!PTN_EMAIL2.test(txtemail2)) {
err += "<li style=\"height:18px\">邮箱格式错误</li>";
}
if (err.length>0) {
$a(err);
showProc(src, false);
return;
}
showProc(src);
$.post("/ajax.ashx?action=AddLeavewordtwo2&t=" + Math.random(), {
email:txtemail2
}, function (msg) {
var sta = gav(msg, "state");
var sMsg = gav(msg, "msg");
if (sta == "1") {
resetinputtwo2();
$a(sMsg, 1);
} else {
$a(sMsg);
}
showProc(src, false);
});
}