$.ajax({
type: 'GET',
url: 'data/teacher.json',
dataType: 'json',
success: function(data) {
alert();
var teacherArr = data.teacherList;
var template = '';
for(var i=0,len=teacherArr.length;i'+
''+
'
'+
'
'+
''+
'
'+
'- '+
'
'+
+obj.name+
'
'+
''+
'
'+
'
'+
''+
'
'+
getLoveLevel(teacherInfo.loveLevel, teacherInfo.nation)+
'
'+
''+
' '+
'- '+
'
'+
'
'+
''+
' '+
'
'+
''+
''+
'
'+
''+getText(teacherInfo.free)+''+
'
'+
''+teacherInfo.money+'美金/分钟'+
'
'+
''+
''+
'')
template+=html;
}
$('.zy-sec-teacher ul').appendTo(template);
},
error: function() {
}
代码上面

这是chrome浏览器network中显示我成功请求到数据,但是不执行success函数,什么原因啊。。。。

这是我项目目录,请求地址是我自己写的json文件,本地服务器
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
呃,请告诉我callback和err分别是什么?
出处