其实,重要的就是这个方法:
具体的在jquery中:
" + "/queryOrder.do",dataType: "json",async:false,data:{
},success: function(data){
for (var i in data)
{
var num = parseInt(i) + 1;
var status = data[i]['status'];
if( status == 0 || status == -4){
strA = '<a class="m1" value="'+ data[i]['orderId'] +'">未处理</a>';
}else if( status == -1 || status == -2){
strA = '<a class="m2" value="'+ data[i]['orderId'] +'">已接受</a>';
}else if( status == -3){
strA = '<a class="m3" value="'+ data[i]['orderId'] +'">已完成</a>';
}
str +="<tr><td>" + num + "</td><td>"
+ data[i]['ownerName'] + "</td><td>"
+ data[i]['telephone'] + "</td><td>"
+ data[i]['hopeTimeName'] + "</td><td>"
+ data[i]['build'] + "</td><td>"
+ data[i]['description'] + "</td><td>"
+ strA + "</td>";
+ "</tr>";
}
$(".tabletr").after(str);
},error: function(data){
}
})
});
@H_403_11@