title: Set value of type="file" via jquery
body: <blockquote>
    <p><strong>Note:</strong></p>
    
    <p>The answer(s) below reflect the state of legacy browsers in 2009. Now you can actually set the value of the file input element dynamically/programatically using JavaScript in 2017.</p>
    
    <p>See the answer in this question for details as well as a demo:<br><a href="https://stackoverflow.com/q/47515232/584192">How to set file input value programatically (i.e.: when drag-dropping files)?</a></p>
  </blockquote>
  
  
  
  <p>Without upload(browse) a file I want to set a value of <code>fileuploader</code> through button click.Is it possible or I am in wrong way?<br>
  sample html:</p>
  
  <pre><code>&lt;input type="file" id="files" /&gt;
  &lt;input type="button" id="btnTest" value="Test"/&gt;
  </code></pre>
  
  <p>and jquery:</p>
  
  <pre><code> $("#btnTest").click(function() {
        alert('test');
       //$('#files').html('pp.img');
       //$('#files').val('pp.img');
       $('#files').text('pp.img')
  });
  </code></pre>
  
  <p>But its not work for me .</p>