RT , 试了一下发现不能触发,大家有没有什么办法?
1
airycanon Oct 20, 2016
|
2
sohu022 OP @airycanon 我意思是触发点击按钮, 出现文件选择对话框 类似这样 http://jsfiddle.net/ebSS2/
|
3
sohu022 OP @airycanon 应该没办法用代码触发。
for example if you(the script) programmatically click the button in an ajax callback nothing will happen, but if you put the same line of code in an event handler that was raised by the user, it will work. |
4
airycanon Oct 20, 2016
http://fex.baidu.com/webuploader/doc/index.html#WebUploader_Uploader_options
这里写的很清楚,参数 pick 指定选择文件的按钮,请仔细阅读文档。 |
6
hurrak Oct 26, 2017
$('.webuploader-element-invisible').trigger('click');
webuploader-element-invisible 是 div#picker 里面创建的 input[type=file] ,选择文件后会触发 webuploader 的后续事件。 |