教程集 www.jiaochengji.com
教程集 >  jQuery  >  jQuery 插件  >  正文 jQuery的CSV插件 jQuery CSV

jQuery的CSV插件 jQuery CSV

发布时间:2014-07-12   编辑:jiaochengji.com
Convert CSV data into an array of arrays. // Convert CSV data into array of arrays jQuery.csv()("1,2,3\n4,5,6\n7,8,9\n"); // = [ [1,2,3], [4,5,6], [7,8,9] ] // It handles quotes jQuery.csv()('a,"b,c",d'); // = [ ['a&apos
Convert CSV data into an array of arrays. // Convert CSV data into array of arrays
jquery.csv()("1,2,3\n4,5,6\n7,8,9\n"); // = [ [1,2,3], [4,5,6], [7,8,9] ]

// It handles quotes
jQuery.csv()('a,"b,c",d'); // = [ ['a', 'b,c', 'd'] ]

// You can use any delimiter, e.g. tab
jQuery.csv("\t")("a\tb\nc\td\n"); // = [ ['a','b'], ['c','d'] ]

// Quick usage with AJAX:
jQuery.get(csvfile, function(data) { array = jQuery.csv()(data); });

// Using across multiple files
var getTSV = jQuery.csv("\t");
jQuery.get(csvfile1, function(data) { array1 = getTSV(data); });
jQuery.get(csvfile2, function(data) { array2 = getTSV(data); });  

您可能感兴趣的文章:
jQuery的CSV插件 jQuery CSV
CSV格式读取表格插件 csv2table
php csv导入数据库的例子
php读取与下载csv文件的示例代码
php读取csv、写入csv与导出csv文件
php读取(打开)csv文件的小例子
php导出csv时身份证号禁止科学计数
基于jQuery的表格操作插件
php导出(生成)CSV文件的小例子
使用PHP导入与导出CSV文件实例详解

[关闭]
~ ~