上一節(jié)的get()后要加上一個(gè)json,為什么post不加php呢
$.get("http://yifanck.cn/data/info_f.php",function(data) {
? ? ? ? ? ? ? ? ? ? ? ? $this.attr("disabled", "true");
? ? ? ? ? ? ? ? ? ? ? ? $("ul").append("<li>我的名字叫:" + data.name + "</li>");
? ? ? ? ? ? ? ? ? ? ? ? $("ul").append("<li>男朋友對(duì)我說:" + data.say + "</li>");
? ? ? ? ? ? ? ? ? ? }, "json");
2017-04-21
返回 json 數(shù)據(jù)類型,GET請(qǐng)求會(huì)將參數(shù)跟在URL后進(jìn)行傳遞,而POST請(qǐng)求則是作為HTTP消息的實(shí)體內(nèi)容發(fā)送給WEB服務(wù)器。