前端代码如下,后台能过查到数据,但是前台无法输出显示,是代码错误还是?
<!DOCTYPE html>
<html ng-app = 'test'>
<head>
<meta charset="UTF-8">
<meta http-equiv="Content-type=text/html;charset=utf-8"/>
<!-- jQuery -->
<script type="text/javascript" src="http://code.changer.hk/jquery/1.11.2/jquery.min.js"></script>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<style type="text/css">
.table{
width: 1000px;
text-align: center;
}
</style>
<title>学生信息管理</title>
</head>
<body ng-controller = 'main'>
<div class="">
<table class="table table-bordered table-striped">
<thead>
<tr>
<td>学号</td>
<td>姓名</td>
<td>班级</td>
<td>学院</td>
<td>电话</td>
</tr>
</thead>
<tbody id="demo1"></tbody>
</table>
</div>
</body>
<script type="text/javascript">
$(function(){
$.ajax({
url:'http://crbm.ahzsksw.com/zs/search.php',
type:'GET',
async: true,
dataType:'json',
success:function(data){
if(data.result=="1"){
var html='';
$.each(data, function(k, v){
html += '<li><p><span class="alizi-badge">'+ v.xuexixingshi+'</span>'+ v.name[0]+'同学 ['+ v.phone+']</p><p><span class="alizi-date">'+ v.add_time+'</span><span style="margin-right: 15px;">学校:'+ v.yuanxiao+'</span><span style="margin-right: 15px;">层次:'+ v.cengci+'</span>专业:'+ v.zhuanye+'</p></li>';
});
$('#demo1').html(html);
}
},
error: function(data){}
})
});
</script>
</html>