我有一个表,因为我有 2 列,其中一个是文件和另一个权限。
对于所有表格行,我都有刷新按钮。
我需要的是当我单击刷新按钮时,它应该只刷新刷新按钮所在的同一行的列。
但现在它正在刷新特定的行和特定的列,但是当我更改数据库中的值并单击刷新时,更改的值没有得到更新......
这是我的代码:
jQuery代码
<script type="text/javascript">
$(document).ready(function(){
$("#buton").click(function(){
$(this).parent().siblings(".b1").load(".b1");
$(this).parent().siblings(".b2").load(".b2");
});
});
</script>
jsp代码:
<table border="1">
<tr>
<td class = "b1"><s:property value="%{#u.files}" /></td>
<td class = "b2"><s:property value="%{#u.perm}" /></td>
<td><a href=""><img src="images/refresh.png" title="Refresh" id="buton"></a></td>
</tr>
</table>