html代码
{$vo.list_order} {$vo.id}// js代码
$(document).on('click','#list_order', function () {
//获取当前对象
var list_order = $(this).text();
//获取修改的id
var id = $(this).parent().next().html();
$(this).parent().html("");
$(".fo").focus();
$(".fo").blur(function() {
//获取到修改后的值
var val = $(".fo").val();
//传到后台进行修改
$.ajax({
type: "post",
url: "ajax后台路径",
data: {id:id,list_order:val},
success: function(msg){
if(msg == 'ok'){
layer.msg('修改成功!');
window.location.reload();
}else{
layer.msg('修改失败!');
}
}
});
/*
将所有修改信息传到后端
*/
$(this).parent().html("" + val + "");
})
})
标签:即点,val,list,order,html,msg,php,id
来源: https://www.cnblogs.com/dalaowang/p/11551366.html