title: Clearing file input box in Internet Explorer
body: <p>I have an file upload box and a clear button on my page. When I press the clear button, I want the text in the file upload box to be cleared.</p>
  
  <p>The following works in Firefox, but doesn't in IE (the text stays there). Is there a workaround for this?</p>
  
  <pre><code>$("#clear").click( function() {
      $("#attachment").val("");
      //document.myform.attachment.value = "";
  })
  </code></pre>
  
  <p>HTML:</p>
  
  <pre><code>&lt;form name="myform"&gt;
      &lt;input type="file" name="attachment" id="attachment" /&gt;
  &lt;/form&gt;
  &lt;br /&gt;&lt;button id="clear"&gt;Clear Attachment&lt;/button&gt;
  </code></pre>
  
  <p><a href="http://jsfiddle.net/VnU4q/" rel="noreferrer">jsFiddle</a></p>