jquery 更新了数据库后局部刷新
如何刷新更改后的数据显示,用的是<table>
问题补充:
jquery是这样:
$(document).ready(function()
{
$("#bbajax").click(function()
{
$.ajax({
type:"POST",
url:"DTupdate.jsp",
data:"pname="+$("#idname").val()+"&pprice="+$("#idprice").val()+"&pid="+$("#idpid").val(),
success:function()
{
alert("更新成功");
//location.reload();
这里怎么写可以让页面不闪刷新??
}
});
});
});
HTML:
<table border="0">
<tr>
<th class="hide">编号</th>
<th>商品</th>
<th>金额</th>
<th>说明</th>
</tr>
<%
while(rs.next()){
%>
<tr>
<td class="hide"><% out.print(rs.getInt(1));%></td>
<td><% out.print(rs.getString(2));%></td>
<td><% out.print(rs.getFloat(3));%></td>
<td><% out.print(rs.getString(4));%></td>
</tr>
<% }
%>
</table>
浙公网安备 33010602011771号