Javascript 数据库内容更新后如何刷新表、行或单元格内容
我想知道是否可能,以及如何更新一个表单元格或整行或整张表,如果在更新数据库中该行的值后更容易的话 这是这张桌子的样品Javascript 数据库内容更新后如何刷新表、行或单元格内容,javascript,php,jquery,ajax,Javascript,Php,Jquery,Ajax,我想知道是否可能,以及如何更新一个表单元格或整行或整张表,如果在更新数据库中该行的值后更容易的话 这是这张桌子的样品 听起来你的基本目标是阻止你的提交按钮提交表单。根据您的实现,有两种不同的选择。下面是一个非常有用的示例链接: 行更新后,您可以再次调用按钮as do search。我建议您添加更多详细信息,并制作工作JSFIDLE示例。这个问题目前确实无法回答。让我看看如何更好地回答我的问题。我准备好后会发布更新。谢谢你的反馈。 <div class="table-responsive"&
听起来你的基本目标是阻止你的提交按钮提交表单。根据您的实现,有两种不同的选择。下面是一个非常有用的示例链接:
行更新后,您可以再次调用按钮as do search。我建议您添加更多详细信息,并制作工作JSFIDLE示例。这个问题目前确实无法回答。让我看看如何更好地回答我的问题。我准备好后会发布更新。谢谢你的反馈。
<div class="table-responsive">
<table class="table table-striped table-bordered table-hover" id="user_list">
<thead>
<tr>
<th> Row ID </th>
<th> Name </th>
<th> Status </th>
<th> Update Date </th>
<th> Action </th>
</tr>
</thead>
<tbody>
<!-- Table data loaded here from jQuery/Ajax after search-->
</tbody>
</table>
</div>
$(".row-update-btn").click(function(){
var row = $(this).attr('id');
$.ajax({
type : 'POST',
url : 'row_update_test.php',
data : {id:row},
cache: false,
success : function(data)
{
alert(row); //simple test to see which record number was updated.
//this is where I believe the refresh/reload code should go?
}
});
});