<html>
<body>
<input type="file" id="files" name="files"/>
<script>
function handleFileSelect(evt) {
var f = evt.target.files[0];
var reader = new FileReader();
reader.onload = function (e) {
console.log(e.target.result);
};
reader.readAsText(f);
}
document.getElementById('files').addEventListener('change', handleFileSelect);
</script>
</body>
</html>