我试图在HTML页面中以表格格式从JSON文件获取数据,但是我收到错误。
未捕获的TypeError:$ .getJSON不是函数
我该如何解决这个问题?
$(document).ready(function()
$.getJSON("Info.json", function(data) {
var Employee_info = '';
$.each(data, function(key, value) {
Employee_info += '<tr>';
Employee_info += '<td>' + value.Name + '</td>';
Employee_info += '<td>' + value.Address + '</td>';
Employee_info += '<td>' + value.Gender + '</td>';
Employee_info += '<td>' + value.Designation + '</td>';
Employee_info += '<td>' + value.Age + '</td>'
Employee_info += '</tr>'
});
$('#Employee_table').append(Employee_info);
});
});