-1
我是javascript新手,我試圖從一個大的csv文件中獲取唯一id列中的一行。我會怎麼做呢?我發現這裏的例子http://www.activewidgets.com/javascript.forum.25996.1/filter-rows-in-csv-file.html在javascript中過濾一個csv文件中的一行
function filter(text, column){
var i, rows = [], max = table.getCount();
if (text==''){
obj.setRowCount(max);
obj.setRowIndices('');
}
if (text !=''){
for (i=0; i<max; i++){
if (obj.getCellValue("column", i).indexOf(text)> -1){
rows.push(i);
}
}
obj.setRowCount(rows.length);
obj.setRowIndices(rows);
}
obj.getRowsTemplate().refresh();
}
,但我不知道如果CSV文件自動爲一個表,在這裏我要指出哪些csv文件正在處理中。