LineReader:使用 HTML5 FileReader API 在浏览器中逐行读取文件

时间:2021-08-04 07:42:58
【文件属性】:
文件名称:LineReader:使用 HTML5 FileReader API 在浏览器中逐行读取文件
文件大小:6KB
文件格式:ZIP
更新时间:2021-08-04 07:42:58
JavaScript 行阅读器 使用 HTML5 文件 API 逐行读取文件。 用法 用户选择文件后: // Grab a file reference var file = document . getElementById ( 'my-file-input' ) . files [ 0 ] ; // Create a new instance of the LineReader var lr = new LineReader ( ) ; // Bind to the line event lr . on ( 'line' , function ( line , next ) { // Do something with line.... next ( ) ; // Call next to resume... } ) ; // Begin reading the file lr . read (
【文件预览】:
LineReader-master
----README.md(1KB)
----LICENSE.md(1KB)
----LineReader.js(7KB)
----demo()
--------test.txt(21B)
--------test-utf8.txt(1012B)
--------index.html(1KB)

网友评论