21,886
社区成员
发帖
与我相关
我的任务
分享
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript" src="http://lib.sinaapp.com/js/jquery/1.6/jquery.js"></script>
</head>
<table>
<thead>
<tr>
<th>Month</th>
</tr>
</thead>
<tfoot>
<tr>
<td>Sum</td>
</tr>
</tfoot>
<tbody id="content"></tbody>
</table>
<body>
<input type="button" id="submit" value="提交">
<script type="text/javascript">
$("#submit").click(function(){
$.ajax({url: 'p.php',
type: 'GET',
dataType: 'html',
timeout: 1000,
error: function(){alert('Error');},
success: function(result){
$("#content").html(result);
}
});
return false;
});
</script>
</body>
</html>
<?php
exit("<tr><td>1</td></tr><tr><td>12</td></tr><tr><td>13</td></tr><tr><td>14</td></tr><tr><td>15</td></tr>");