<input name="file" type="file" onchange="file_render(this);" />
function file_render(obj){
files = obj.files;
for (var i = 0, f; f = files[i]; i++) {
var reader = new FileReader();
reader.onload = (function(theFile) {
return function(e) {
if(e.target.result){
console.log(e.target.result);
}
};
})(f);
// Read in the image file as a data URL.
reader.readAsText(f);
}
}