$(function(){ phpjs_parent_opt('','unit','11907','postForm');phpjs_parent_opt('','dstyle','11908','postForm');phpjs_parent_bemod('1579','designer','11909','postForm');}); function to_submit(f){ var formId = $("#"+f),form = $("form",formId),imgcode = $("#imgcode",formId),btn = $("#_phpok_submit",formId); var contact = formId.find("#contact");var contact_Val = contact.val(); if(!contact_Val){layer.msg("请填写您的姓名", {icon: 2,shade: .3,time: 1000});contact.focus();return false;} var phone = formId.find("#phone");var phone_Val = phone.val(); if(!(/^1[3-9]\d{9}$/.test(phone_Val))){layer.msg("手机号码未填写或填写错误", {icon: 2,shade: .3,time: 1000});phone.focus();return false;} var content = formId.find("#content");var content_Val = content.val(); if(!content_Val){layer.msg("请输入装修要求", {icon: 2,shade: .3,time: 1000});content.focus();return false;} var check = formId.find("#sys_check");if(!check.val()){layer.msg('请输入验证码', {icon: 2,shade: .3,time: 1000});check.focus();return false;} $.get("?c=post&f=ajax_checkcode&sys_check="+check.val(), function(data){if(data!="success"){imgcode.attr("src",get_url("login,codes")+'rand='+Math.random());layer.msg('验证码有误!请重新填写', {icon: 2,shade: .3,time: 1000});check.val('');check.focus();return false;}else{$.post(form.attr("action"), form.serialize(),function(data2){layer.msg($("#tomsg",formId).val(), {icon: 1,shade: .3,time: 2000});imgcode.attr("src",get_url("login,codes")+'rand='+Math.random());check.val('');});} });return false;}

推荐案例

热门活动

圣兰菲诺198㎡

圣兰菲诺198㎡