How to add one button here(submit button) to read the uploaded text file
(here it is uploading and printing just after it)
how to make it manual by adding one button !
please help
<html>
<head> upload your file here
<style>
</style>
</head>
<body>
<button
<input type="file" id="myFile">
<div id="output"></div>
<script type="text/javascript">
var input = document.getElementById("myFile");
var output = document.getElementById("output");
input.addEventListener("change", function ()
{
if (this.files && this.files[0])
{
var myFile = this.files[0];
var reader = new FileReader();
reader.addEventListener('load', function (e)
{
output.textContent = e.target.result;
}
);
reader.readAsBinaryString(myFile);
}
});
</script>
</body>
</html>