jquery中的ajax
★: $.get(url,params,function(数据){},type);
发送get请求的ajax
url:请求的路径
params:请求的参数 参数为key\value的形式 key=value {"":"","":""}
fn:回调函数 参数就是服务器发送回来的数据
type:返回内容格式,xml, html, script, json, text, _default。 以后用"json"
★: $.post(url,params,function(数据){},type);
发送post请求的ajax
若结果为json格式, 打印返回值的时候是一个对象
例如若json为 {"result":"success","msg":"成功"}
获取msg 只需要 参数.msg
$.post("uri",{"method":"getDetailByOid","oid":oid},function(data){
$(data).each(function(){
this.produc