Open file in Javascript from user-specified file name
<p>I want to open a file in Javascript that the user selects from the local filesystem. I can get the file name but I don't know how to open it.</p>

<pre><code>&lt;form action='' method='POST' enctype='multipart/form-data'&gt;
    &lt;input id="archiveFile" type='file' name='userFile'&gt;&lt;br&gt;
    &lt;script&gt;
        archiveFile.onchange = function (e)
        {
            console.log(archiveFile.value);
            // open the file here
        }
    &lt;/script&gt;
&lt;/form&gt;
</code></pre>