是这样的,公司需要拿个假页面html去展示一下,这里面有表格的查询功能,我该怎么写查询呢,如下图。
$(function(){
var dataTable = [
{'batteryCode':'S16030116','battreyV':'107','circleLine':'75%',
'batteryType':'链路故障','showTime':'2018-3-12','dealTime':'2018-4-12',
'operator':'曹海燕','resul':'模组检测发现V14极耳虚焊','dealLate':'是'},
{'batteryCode':'S16030116','battreyV':'107','circleLine':'75%',
'batteryType':'链路故障','showTime':'2018-3-12','dealTime':'2018-4-12',
'operator':'曹海燕','resul':'模组检测发现V14极耳虚焊','dealLate':'是'},
{'batteryCode':'S16030116','battreyV':'107','circleLine':'75%',
'batteryType':'链路故障','showTime':'2018-3-12','dealTime':'2018-4-12',
'operator':'曹海燕','resul':'模组检测发现V14极耳虚焊','dealLate':'是'},
{'batteryCode':'S16030116','battreyV':'107','circleLine':'75%',
'batteryType':'链路故障','showTime':'2018-3-12','dealTime':'2018-4-12',
'operator':'曹海燕','resul':'模组检测发现V14极耳虚焊','dealLate':'是'}
];
var str = "";
str += "<tbody'>";
for (var i = 0; i < dataTable.length;i++){
str += "<tr>";
str+="<td>"+dataTable[i].batteryCode+"</td>";
str+="<td>"+dataTable[i].battreyV+"</td>"
str+="<td>"+dataTable[i].circleLine+"</td>"
str+="<td>"+dataTable[i].batteryType+"</td>"
str+="<td>"+dataTable[i].showTime+"</td>"
str+="<td>"+dataTable[i].dealTime+"</td>"
str+="<td>"+dataTable[i].operator+"</td>"
str+="<td>"+dataTable[i].resul+"</td>"
str+="<td>"+dataTable[i].dealLate+"</td>"
str += "</tr>";
}
str += "</tbody>";
$('.inner_tab').append(str)
})
繁星淼淼
胡说叔叔
相关分类