开发者

jQuery file upload - get the "Open" event from the dialog window

开发者 https://www.devze.com 2023-01-11 05:30 出处:网络
Does a开发者_运维百科nyone know how can I find out when the \"Open\" button was clicked in the dialog window of the file upload?

Does a开发者_运维百科nyone know how can I find out when the "Open" button was clicked in the dialog window of the file upload?

I just want to do some checks once this has happened (validation etc.) and then perform the upload automatically.

Also - I don't want to use any plugins as I know there are a few.


But the file dialog opens upon clicking on the <input type="file" /> field.

So you could even do..

$("#element").click({
   //dialog opening now
});

.change() would trigger only if you actually select something that differs from the previous value, if I'm not wrong.

0

精彩评论

暂无评论...
验证码 换一张
取 消