IE 11使用HTML input = file标记时锁定文件 [英] IE 11 lock the file when using HTML input=file tag

查看:162
本文介绍了IE 11使用HTML input = file标记时锁定文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

  1. 我在IE11中输入的文件中通过浏览选择文件

  1. I choose the file using browse in the file input in IE11

我在资源管理器中使用shift + delete删除了文件

I deleted the file using shift+delete in the Explorer

然后,当我刷新文件夹时,删除的文件会再次出现在资源管理器中.

Then when I refresh the folder, the file that I deleted reappear again in Explorer.

无论如何,我可以通过客户端javascript释放文件句柄吗?我在IE 8中尝试了该测试,但未出现该问题.

Is there anyway that I can release the file handle by at the client side javascript? I tried that test in IE 8 but that issue didn't occurred.

感谢任何帮助.

推荐答案

我可以按照IE 11中的说明释放文件处理程序.

I could release the file handler as following in IE 11.

    document.getElementById("fileToUpload").value=""; // input file field
    document.getElementById("uploadForm").reset(); // form that containing input file field

这篇关于IE 11使用HTML input = file标记时锁定文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆