如果我有
<input id="uploadFile" type="file" />
Run Code Online (Sandbox Code Playgroud)
标记和提交按钮,如何在IE6(及更高版本)中确定用户是否选择了文件.
在FF中,我只是这样做:
var selected = document.getElementById("uploadBox").files.length > 0;
Run Code Online (Sandbox Code Playgroud)
但这在IE中不起作用.