Its not very easy if not impossible with before HTML5, but with HTML5 it is pretty straigth forward. You can do that in client side itself using file read API in HTML 5;
var reader = new FileReader();
FileReader.readAsText(f); //f is a file selected by the user in the file input box.
Please refer to following article for detail;
Reading file with JavaScript using File API