I have the html code to read a local file below:
<p><input id="file-input" type="file" /></p>
<p>Search keyword</p>
<p><input id="searchbar" spellcheck="true" type="text" /></p>
<h3>Results</h3>
<pre id="file-content">No data yet.</pre>
which I would like to work with the search javascript given by Roko C. Buljan in this post here
In your Javascript code, try using
FileReader.readAsText
here. Then handle it as you want.If you want to search in your file-content element then you can do it like below
http://jsfiddle.net/UPs3V/291/