Thy*_*tas 12 html javascript jquery internet-explorer
我在Internet Explorer中输入(type ="file")有问题(我仅在8中测试过).
HTML
<input id="drop-file-files" class="drop-file-waiting" type="file">
Run Code Online (Sandbox Code Playgroud)
JS(http://code.jquery.com/jquery-latest.min.js)
$('#drop-file-files').change(function(e){
$.each(e.target.files, function(index, file){
alert(file);
});
});
Run Code Online (Sandbox Code Playgroud)
它在Firefox,Chrome和Safari返回目标文件中工作得很完美,但IE返回错误,因为e.target中的"files"未定义.有人知道如何使用JavaScript获取此"文件"?
已编辑:文档MSDN输入类型=文件 - 仅在IE10 文件属性中
| 归档时间: |
|
| 查看次数: |
30034 次 |
| 最近记录: |