关于使用Ajax的数据交互

请问使用前台使用ajax如何与后台数据进行交互?怎么去取得后台数据?

服务器照常写,前段页面用 $ajax.get(访问你的页面) 得到数据,并且更新网页

用ajax获取的后台数据,是以json数据返回,只需要解析json数据即可

jquery 的$.get()或$.post()
$.post("demo_ajax_gethint.asp",{suggest:txt},function(result){
console.log(result)
});

$.ajax({
type: "POST", //post方式 或者get方式 自己选
url: "json/xxx", //具体Action

dataType: "json",
cache: false,
async :true,

data : {
"xx" : xx,
"xx":xx,
},
success: function(data){
//后台返回数据。 json格式。 前端解析 data中包含的json数据 就OK
}

http://www.cnblogs.com/guanghe/p/6193721.html