ajax提交url与ajax提交表单的详细比较(2)

function fn_check_form(){
    if($("#Name").val() == ""){
alert("人不能为空");
$("#Name").focus();
return false;
}
       }

function showResponse(responseText) { 
               try{ 
                //alert(responseText);
                   if(responseText == 'true'){ 
                        alert('操作成功!');
                        window.location.reload();
                   }
                   else if(responseText == 'paramFalse')
                   {
                    alert("必填参数不能为空!")
                   }
                   else if(responseText == 'timeError')
                   {
                     alert("出发时间不能大于报销时间!");
                   }
                   else{ 
                        alert('操作失败!'); 
                     //   window.location.reload();
                    } 
                }catch(e){alert(e.message);} 
        } 

您可能感兴趣的文章:

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/wfwggw.html