How can I auto trigger file input? ie. in the link below I want to trigger upload button on load
DEMO
8条回答 时光说笑 (楼主) 2021-02-13 04:55 $("document").ready(function() { setTimeout(function() { $("#test1").trigger('click'); },10); $('#test1').click(function(){ alert('hii'); }) }); click event triggerd. http://jsfiddle.net/j9oL4nyn/1/ 0 讨论(0) 查看其它8个回答 发布评论: 提交评论 加载中... 自定义标题段落格式字体字号代码语言点击上传x 验证码 看不清? 提交回复
$("document").ready(function() { setTimeout(function() { $("#test1").trigger('click'); },10); $('#test1').click(function(){ alert('hii'); }) });
click event triggerd.
http://jsfiddle.net/j9oL4nyn/1/
热议问题