1
airycanon 2016-10-20 15:44:53 +08:00
|
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 2016-10-20 16:02:43 +08:00
http://fex.baidu.com/webuploader/doc/index.html#WebUploader_Uploader_options
这里写的很清楚,参数 pick 指定选择文件的按钮,请仔细阅读文档。 |
6
hurrak 2017-10-26 17:33:42 +08:00
$('.webuploader-element-invisible').trigger('click');
webuploader-element-invisible 是 div#picker 里面创建的 input[type=file] ,选择文件后会触发 webuploader 的后续事件。 |