﻿
function SubmitRevert(){
var lname=$("#txbname").val();
var lxfs=$("#txblxfs").val();
var lcontent=$("#txtContent").val();
var pid=$("#hdPid").val();
var muid=$("#hdmuid").val();
if(lname.length==0){alert("请输入您的真实姓名！");$("#txbname")[0].focus();return false; }
if(lxfs.length==0){alert("请输入您的联系方式！");$("#txblxfs")[0].focus();return false; }
if(lcontent.length==0){alert("请输入您的备注信息！");$("#txtContent")[0].focus();return false; }
var imgCode=$("#txbCode").val();
if(imgCode==""){alert("请输入验证码！");$("#spCode").show();$("#spCode").html(" <img src='/images/icoRedx.gif' alt='填写错误' align='absmiddle' /> 请输入验证码!");$("#txbCode")[0].focus();return false;}
if($("img[src$=icoRedx.gif]").size()>0){
alert("您的验证码输入有误！");$("#txbCode")[0].focus(); return false;}
$.post("/ajax.aspx",{typeId:6,lname:lname,lxfs:lxfs,lcontent:lcontent,pid:pid,muid:muid,mycode:imgCode},function(ress){
$("#RevertReturnDiv").html("正在加载....");
$("#RevertReturnDiv").html("<font color='red'>"+ress+"</font>");
if(ress=="添加成功！"){
$("#RevertReturnDiv").fadeOut("6000"); 
$("#txbname").val("");
$("#txblxfs").val("");
$("#txtContent").val("");
$("#txbCode").val("");
}
});
}

function checkImgCode(){
var imgCode=$("#txbCode").val();
if(imgCode==""){$("#spCode").show();$("#spCode").html(" <img src='/images/icoRedx.gif' alt='填写错误' align='absmiddle' /> 请输入验证码!");return false;}
else{
$.post("/ajax.aspx",{typeId:7,imgCode:imgCode},function(ress){
$("#spCode").show();
$("#spCode").html(ress);
})
}
}
