I am trying to make a text file reader for a library I am making.
It returns the path. How can I make it to return the contents of a file?
function alertText() {
var text = document.getElementsByTagName("input")[0].value;
alert(text)
}
<input type="file" onchange="alertText();">
Thank you.