在UserList.jsp頁面中的Ajax調(diào)用:
function getMessage(id){
//AJax調(diào)用
$.ajax({
type: "POST",
url: "/UserAction!getAjaxMessage.action",
data: "id="+id,
dataType:"json",
success: function(rt){
if(rt.rtn == "1"){
//相應(yīng)處理
$("#testAjax").html(rt.message);
}else{
$("#testAjax").html("獲取失敗");
}
}
});
}
自我觀點:其實Ajax,就是js的一種。
本站僅提供存儲服務(wù),所有內(nèi)容均由用戶發(fā)布,如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請
點擊舉報。