//首页发送留言 function IndexsendApply(src) { var txtZL = $j("Busername").val(); //姓名 var stxtFMobileNo = $j("Btel").val(); //联系电话 var stxtAddre = "" var stxtSContact = ""; var err = ""; var reg = /^\s*$/; if (reg.test(txtZL)) { err += "

您的姓名不可为空

"; } var partten = /(^(([0\+]\d{2,3}-)?(0\d{2,3})-)(\d{7,8})(-(\d{3,}))?$)|(^1[3,5,8]\d{9}$)/ //座机或手机 if (reg.test(stxtFMobileNo)) { err += "

您的联系手机不可为空

"; } else if (stxtFMobileNo.length > 0) { if (!partten.test(stxtFMobileNo)) { err += "

您的联系手机格式错误

"; } } if (err.length > 0) { $a(err); return; } $.post("/ajax.ashx?action=IndexAddLeaveword&t=" + Math.random(), { name: txtZL, mobileno: stxtFMobileNo }, function (msg) { var sta = gav(msg, "state"); var sMsg = gav(msg, "msg"); if (sta == "1") { $a(sMsg, 1); $("#Busername").val(""); //姓名 $("#Btel").val(""); //联系电话 $("#txtAddre").val(""); //地址 $("#txtContent").val(""); //需求 } else { $a(sMsg); } }); } function GB() { $(".quickform").animate({ left: '-85%' }, 500); $("#qone5").show(); } function KQ() { $("#qone5").hide(); $(".quickform").animate({ left: 0 }, 500); } $(function () { $(".sidebar-bottom .close").click(function () { if ($(".sidebar-bottom").css("bottom") == "-104px") { $(".sidebar-bottom").animate({ bottom: 0 }, 500); } else { $(".sidebar-bottom").animate({ bottom: -104 }, 500); } }) })