我想附加表格,但问题是它没有在表格中添加任何内容
<%@page import="database.FoodServiceDAO"%>
<%@page import="beans.categoryBean"%>
<%@page import="java.util.ArrayList"%>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<body>
<table id="table_design">
<tr id="categorys">
</tr>
</table>
<script type="text/javascript" src="javascript/jquery.js"></script>
<script type="text/javascript" src="javascript/ajax.js"></script>
</body>
</html>
现在我只想附加一个表ajax的代码,如下所示,问题是没有填充任何内容
$(function () {
var $categorys = $('#categorys');
$.ajax({
type: 'GET' ,
url: '/controller?action=category' ,
success: function(categorys){
$.each(categorys, function(i, categorys){
$categorys.append("<td><h1>Heelo</h1></td>") ;
});
}
});
});