I'd like to make a click event fire on an <input type="file">
tag programmatically.
(我想以编程方式在<input type="file">
标记上触发click事件。)
Just calling click() doesn't seem to do anything or at least it doesn't pop up a file selection dialog.
(仅调用click()似乎没有任何作用,或者至少它没有弹出文件选择对话框。)
I've been experimenting with capturing events using listeners and redirecting the event, but I haven't been able to get that to actually perform the event like someone clicked on it.
(我一直在尝试使用侦听器捕获事件并重定向事件,但是我无法像某些人单击它那样使它真正执行事件。)
ask by user28655 translate from so
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…