input type=“file” auto click

后端 未结 3 558
鱼传尺愫
鱼传尺愫 2021-01-13 08:53

How do I automatically open the browse dialog of an input type=\"file\" when the page first opens?

3条回答
  •  执笔经年
    2021-01-13 09:44

    This is completely impossible in Firefox.

    In other browsers, you can:

    document.getElementById('inputId').click();
    

提交回复
热议问题