如何在单击按钮后编辑特定td中的值
How to edit value in a specific td after clicking button
这是我的button
<button id="Modify" role="button" class="btn btn-warning" disabled>Modify</button>
这是我的Modify button
脚本
$("#Modify").click(function(e) {
e.preventDefault();
var id = $('#cLoanOut2 tr.active').attr('id');
bootbox.confirm("Are you sure you want to modify this order?","No","Yes",function(r){
if(r) {
$.ajax({
url : "<?php echo $server_name; ?>/emcis_coopmain/process/PHP_groceryReleasingProcess.php",
type : "POST",
async : false,
data : {
empgrocmstID:id,
todo:"Modify"
},
success:function(result){
bootbox.alert('Order Modified',function(){
$("#Modify").attr("disabled", true);
});
loadTable();
}
});
} else {
}
});
});
和我的php
中的td
$html .= "<td class='qty_ordered' style='text-align:right'>$qty_ordered</td>";
我如何在点击修改按钮后编辑该td上的值?
谢谢你的帮助
如果这个类是特定于<td>
的,那么就像
$("td.qty_ordered").html("<Your new value here>");
此外,如果我的假设是正确的,您可以在ajax()
调用中更改success()
函数中的td
值。
Mabuhay !
相关文章:
- CKEditor Widget-阻止编辑可编辑元素本身
- 如何在angularJS中编辑时,如果DB中的值为true,则设置复选框,如果值为false,则取消选中复选框
- 高亮显示时编辑文本大小和颜色
- 剑道UI内联编辑:如何在点击其他按钮时隐藏按钮
- 将事件聚焦/模糊在可编辑内容的元素上
- 正在获取生成的PHP td值
- 如何在td元素中添加监听器
- 编辑HTML表的源数据
- ExtJS网格单元格编辑器,防止焦点松动问题
- 如何首先设置样式<td>表中包含在窗体中的元素
- 如何在visualstudio中调试web api时编辑javascript文件
- 具有所有样式的文本正在复制到可编辑文本区域
- 可以't使用PHP使用Froala编辑器上传图像URL
- 用Greasemonkey编辑专栏
- 如何在corona sdk中从CK编辑器中检索数据
- 如何在 js 中编辑和更新表中的 td
- 如何将内联编辑的 TD 值传递到数据库
- 在jQuery中获取编辑过的TD值
- 在IE10中使用CKEditor内联编辑TD
- 如何在单击按钮后编辑特定td中的值