TEL:0838-8620489
', infowidth: 240, infoheight: 100, imgurl: 'static/picture/clogo.png', iconimgwidth: 93, iconimgheight: 102 }); jQuery(function () { var regBox = { regEmail: /^([a-z0-9_\.-]+)@([\da-z\.-]+)\.([a-z\.]{2,6})$/, regTel: /(^0?1[3|4|5|8][0-9]\d{8}$)|(^0[\d]{2,3}-[\d]{7,8}$)/, }; var isjaasx = true; jQuery("#submit").click(function () { if (isjaasx) { var namesobj = jQuery("#names"); var telsobj = jQuery("#tels"); var emilobj = jQuery("#emaisl"); var contetnsobj = jQuery("#contetns"); var codemaobj = jQuery("#codema"); if (namesobj.val() == "" || namesobj.val() == "姓名:") { namesobj.focus(); return; } if (telsobj.val() == "" || telsobj.val() == "电话:") { telsobj.focus(); return; } else { var mflag = regBox.regTel.test(telsobj.val()); if (!mflag) { alert("手机或者电话有误!"); telsobj.focus(); return; } }; if (emilobj.val() == "" || emilobj.val() == "邮箱:") { emilobj.focus(); return; } else { var eflag = regBox.regEmail.test(emilobj.val()); if (!eflag) { alert("邮箱格式有误!"); emilobj.focus(); return; } }; if (contetnsobj.val() == "" || contetnsobj.val() == "给我们留言:") { contetnsobj.focus(); return; } if (codemaobj.val() == "" || codemaobj.val() == "验证码:") { codemaobj.focus(); return; } jQuery.ajax({ type: "POST", url: "Tools/publikTools.ashx?t=" + Math.random(), data: { action: "leavemessageforms", Names: namesobj.val(), TEl: telsobj.val(), Contetn: contetnsobj.val(), Emails: emilobj.val(), CodeMa: codemaobj.val() }, dataType: "html", cache: true, beforeSend: function () { isjaasx = false; jQuery("#submit").val("提交中..."); }, success: function (data) { if (data == "y") { jQuery("#submit").val("提交成功!").attr("disabled", "disabled").css({ "cursor": "not-allowed" }); jQuery("#submit").unbind("click"); isjaasx = false; } else { jQuery("#submit").val("" + data + ""); setTimeout(function () { jQuery("#submit").val("提交留言"); isjaasx = true; }, 1500); } }, error: function () { alert("链接错误!"); } }) } }); });