解决方法
你不能:这是所有现代浏览器的安全功能。
When a file is selected by using the input type=file object,the value of the value property depends on the value of the “Include local directory path when uploading files to a server” security setting for the security zone used to display the Web page containing the input object.
The fully qualified filename of the selected file is returned only when this setting is enabled. When the setting is disabled,Internet Explorer 8 replaces the local drive and directory path with the string C:\fakepath\ in order to prevent inappropriate information disclosure.
在所有其他当前主流浏览器我知道,它也被关闭。文件名是你能得到的最好的。
更详细的信息和良好的链接在this question.它指的是获取服务器端的价值,但问题是相同的JavaScript中的表单提交之前。