title: How to change my code from div tag to textarea?
body: <p>Here is my code:</p>
  
  <pre><code>&lt;h1&gt;JavaScript File API demo&lt;/h1&gt;
  &lt;div id="container"&gt;
  &lt;label&gt;Upload files to local repository:&lt;/label&gt;&lt;input type="file" accept=".js" id="uploaded" multiple="multiple"/&gt;
  &lt;div id="fileInfo" &gt;&lt;/div&gt;
  
  &lt;textarea rows="4" cols="50" id="fileInfo2"&gt;&lt;/textarea&gt; 
  
  &lt;/div&gt;
  
  &lt;p&gt;&lt;/p&gt;
  
  &lt;script&gt;
  $(document).ready(function() {
  
    if(!(window.File &amp;&amp; window.FileReader &amp;&amp; window.FileList &amp;&amp; window.Blob)){
      $('#fileContent, input, button, #examples').fadeOut("fast");
      $('&lt;p&gt;Oh no, you need a browser that supports File API. How about &lt;a href="http://www.google.com/chrome"&gt;Google/a&gt;?&lt;/p&gt;').appendTo('#container');
    } else {
            $("#uploaded").change(function (e) {
                  var files = e.target.files; // FileList object
                  // files is a FileList of File objects. List some properties.
                  var output = [];
                  for (var i = 0, f; f = files[i]; i++) {
                    output.push('&lt;li&gt;&lt;strong&gt;', escape(f.name), 
                              '&lt;/strong&gt; (', f.type || 'n/a', ') - ',
                              f.size, ' bytes, last modified: ',
                              f.lastModifiedDate ? f.lastModifiedDate.toLocaleDateString() : 'n/a',
                              '&lt;/li&gt;');
                    var reader = new FileReader();
                    reader.onload = function(e) {
                        $("#fileInfo").append("&lt;li&gt; Data from file: "+"&lt;br/&gt;" + e.target.result.replace(/\n/g, "&lt;br&gt;\&amp;nbsp") + "&lt;/li&gt;");
                    };
                    reader.readAsText(f);
                  }
                  $("#fileInfo").append('&lt;ul&gt;' + output.join('') + n/a +'&lt;/ul&gt;' );
            });
    }
  });
  &lt;/script&gt;
  </code></pre>
  
  <p>this code, shows the data from one or more selected files in a div tag, with the id="fileInfo", used in the last line of code...and the 3rd from below</p>
  
  <p>is there a way to make my code work with the textarea, with the id="fileInfo2" ? i also changed the last line to be like this:</p>
  
  <pre><code>$("#fileInfo2").append("&lt;li&gt; Data from file: "+"&lt;br/&gt;" + e.target.result.replace(/\n/g, "&lt;br&gt;") + "&lt;/li&gt;");
  $("#fileInfo2").append('&lt;ul&gt;' + output.join('') + n/a +'&lt;/ul&gt;' );
  </code></pre>
  
  <p>but id didnt work...</p>
  
  <p>can u help me?</p>