1:ajax自已構(gòu)造一個(gè)url,這種方式傳參數(shù)要用Data,不能用于表單提交。
例:
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("必填參數(shù)不能為空!")
}
else if(responseText == 'timeError')
{
alert("出發(fā)時(shí)間不能大于報(bào)銷時(shí)間!");
}
else{
alert('操作失敗!');
// window.location.reload();
}
}catch(e){alert(e.message);}
}
標(biāo)簽:銅陵 益陽(yáng) 阿拉善盟 儋州 張掖 鷹潭 延邊
巨人網(wǎng)絡(luò)通訊聲明:本文標(biāo)題《ajax提交url與ajax提交表單的詳細(xì)比較》,本文關(guān)鍵詞 ajax,提交,url,與,表單,的,;如發(fā)現(xiàn)本文內(nèi)容存在版權(quán)問(wèn)題,煩請(qǐng)?zhí)峁┫嚓P(guān)信息告之我們,我們將及時(shí)溝通與處理。本站內(nèi)容系統(tǒng)采集于網(wǎng)絡(luò),涉及言論、版權(quán)與本站無(wú)關(guān)。