<pre id="output"></pre> <script type="text/javascript"> document.getElementById('inputfile') .addEventListener('change', function() { var fr=new FileReader(); fr.onload=function(){ document.getElementById('output') .textContent=fr.result; } fr.readAsText(this.files[0]); }) </script>
I'm not at all sure how to do this. Instead of asking for a file, i want it to write from a set file hosted on my server.
1.4m articles
1.4m replys
5 comments
56.9k users