If I upload data (say a text file) from my local computer, with this function
var button = document.getElementById('myFile');
<p id = "out">The content of the file is</p>
<input type = "file" id = "myFile" style="margin-top:5%;">
How do I retrieve data from the uploaded file? I'm thinking about the simplest case which can be a text file to be appended to a div.