id=text.find("tr:eq("+o+")").children('td:eq(0)').text(id);
username=text.find("tr:eq("+o+")").children('td:eq(1)').text(username);
sex=text.find("tr:eq("+o+")").children('td:eq(2)').text(sex);
age=text.find("tr:eq("+o+")").children('td:eq(3)').text(age);
institute=text.find("tr:eq("+o+")").children('td:eq(4)').text(institute);
grade=text.find("tr:eq("+o+")").children('td:eq(5)').text(grade);
phone=text.find("tr:eq("+o+")").children('td:eq(6)').text(phone);
hlbhl=text.find("tr:eq("+o+")").children('td:eq(7)').text(hlbhl);
$.ajax({
type: "POST",
url: "doAction2.php",//请求的后台地址 data: {
non:o,
id: id,
username: username,
sex: sex,
age: age,
institute: institute,
grade: grade,
phone: phone,
hlbhl: hlbhl
},//前台传给后台的参数
dataType: "json",
ansync: true,
ContentType: "application/json; charset=utf-8",
success: function (msg) {//msg:返回值
a=2;
console.log(a);
}
});
edit.style.display='none';
});
从上面可以看出,我传给data的数据并不是字符串之类的,而是一个n.fn.init [td, prevObject: n.fn.init(1), context: document],
由于自己的粗心和对导致ajax出现错误的情况了解比较少,导致看了很久的代码才发现原因,刚开始就以为不会是参数导致,
因为认为参数错误顶多拿到的数据不对,报下错或者结果不一样,果真自己还是太年轻。










