http://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-49531485说:
value of type DOMString
When the type attribute of the element has the value “text”,“file” or “password”,this represents the current contents of the corresponding form control,in an interactive user agent.
<html> <head><title>...</title> <script type="text/javascript"> function foo() { var f = document.getElementById("f1"); alert( ""==f.value ? "nothing selected" : "file selected"); } </script> </head> <body> <form> <div> <input id ="f1" type="file" name="x" /> </div> </form> <button onclick="foo()">click</button> </body> </html>