.click() on <input type=“file” /> does not work in Firefox 3.6 - Any workarounds?

独自空忆成欢 提交于 2019-12-06 14:26:24
Marcel Jackwerth

The file-dialog breaks out of the sandbox your javascript code runs in (access to HDD). Good/secure browsers (= not IE7) should prevent that this dialog is opened via a script - it MUST be opened by a real mouseclick.

Some browsers seem to allow it, but it varies.

See more in In JavaScript can I make a “click” event fire programmatically for a file input element?

this is fixed in Firefox Version 3.6.23

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!