Javascript adding new button to read the uploaded text file

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

<head>  upload your file here 



    <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 =;


I cleaned up your code.
You need to use triple backticks to post code to the forum.
See this post for details.