http://www.imooc.com/code/13476
慕课这节的知识
$.ajax({
url: "http://www.imooc.com/data/info_f.php",
dataType: "json",
//type: "get",
success: function (data) {
$this.attr("disabled", "true");
$("ul").append("<li>我的名字叫:" + data.name + "</li>");
$("ul").append("<li>男朋友对我说:" + data.say + "</li>");
}
});不用dataType: "json" data.name就是undefined?
php的文件要用dataType: "json"?我本地自己的简单php文件不用dataType: "json",用type: 'get'(不是同一个案例)就能调用
校服
ruibin
相关分类