In JavaScript can I make a “click” event fire programmatically for a file input element?

前端 未结 28 1399
囚心锁ツ
囚心锁ツ 2020-11-21 06:29

I\'d like to make a click event fire on an tag programmatically.

Just calling click() doesn\'t seem to do anything or at lea

28条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-11-21 06:49

    This will now be possible in Firefox 4, with the caveat that it counts as a pop-up window and will therefore be blocked whenever a pop-up window would have been.

提交回复
热议问题